tickera-angular-components 0.0.1-dev.4 → 0.0.1
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,21 +1,20 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, makeEnvironmentProviders, PLATFORM_ID, Inject, Injectable, signal, LOCALE_ID,
|
|
2
|
+
import { InjectionToken, makeEnvironmentProviders, PLATFORM_ID, Inject, Injectable, signal, LOCALE_ID, inject, EventEmitter, Input, Output, ViewEncapsulation, Component, Self, Optional, Injector, HostListener, forwardRef } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/common/http';
|
|
4
4
|
import { HttpHeaders } from '@angular/common/http';
|
|
5
5
|
import { throwError, BehaviorSubject, Subject, of } from 'rxjs';
|
|
6
6
|
import { catchError, distinctUntilChanged, debounceTime, switchMap, takeUntil, map } from 'rxjs/operators';
|
|
7
|
-
import * as
|
|
7
|
+
import * as i1$2 from '@angular/common';
|
|
8
8
|
import { isPlatformBrowser, formatDate, CommonModule, DatePipe } from '@angular/common';
|
|
9
9
|
import { toast } from 'ngx-sonner';
|
|
10
10
|
import { toObservable } from '@angular/core/rxjs-interop';
|
|
11
11
|
import * as i2 from '@jsverse/transloco';
|
|
12
12
|
import { TranslocoModule } from '@jsverse/transloco';
|
|
13
|
-
import * as i3 from '@angular/router';
|
|
14
13
|
import { RouterLink } from '@angular/router';
|
|
15
14
|
import * as i1$1 from '@angular/forms';
|
|
16
15
|
import { FormsModule, ReactiveFormsModule, Validators, NgControl, NG_VALUE_ACCESSOR, NG_VALIDATORS } from '@angular/forms';
|
|
17
16
|
import { DEFAULT_TOOLBAR, Editor, toHTML, NgxEditorComponent, NgxEditorMenuComponent } from 'ngx-editor';
|
|
18
|
-
import * as i2$
|
|
17
|
+
import * as i2$1 from '@ng-select/ng-select';
|
|
19
18
|
import { NgSelectModule } from '@ng-select/ng-select';
|
|
20
19
|
|
|
21
20
|
const TICKERA_COMPONENTS_CONFIG = new InjectionToken('TICKERA_COMPONENTS_CONFIG');
|
|
@@ -902,31 +901,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
902
901
|
args: [{ providedIn: 'root' }]
|
|
903
902
|
}], ctorParameters: () => [{ type: ApiService }] });
|
|
904
903
|
|
|
905
|
-
class PerformancesListEventsService {
|
|
906
|
-
_selectedDay = signal(null, ...(ngDevMode ? [{ debugName: "_selectedDay" }] : []));
|
|
907
|
-
_selectedPerformance = signal(null, ...(ngDevMode ? [{ debugName: "_selectedPerformance" }] : []));
|
|
908
|
-
_filteredShowId = signal(null, ...(ngDevMode ? [{ debugName: "_filteredShowId" }] : []));
|
|
909
|
-
selectedDay = computed(() => this._selectedDay(), ...(ngDevMode ? [{ debugName: "selectedDay" }] : []));
|
|
910
|
-
selectedDayDate = computed(() => this._selectedDay()?.date, ...(ngDevMode ? [{ debugName: "selectedDayDate" }] : []));
|
|
911
|
-
selectedPerformance = computed(() => this._selectedPerformance(), ...(ngDevMode ? [{ debugName: "selectedPerformance" }] : []));
|
|
912
|
-
filteredShowId = computed(() => this._filteredShowId(), ...(ngDevMode ? [{ debugName: "filteredShowId" }] : []));
|
|
913
|
-
setSelectedDay(day) {
|
|
914
|
-
this._selectedDay.set(day);
|
|
915
|
-
}
|
|
916
|
-
setSelectedPerformance(performance) {
|
|
917
|
-
this._selectedPerformance.set(performance);
|
|
918
|
-
}
|
|
919
|
-
setFilteredShowId(id) {
|
|
920
|
-
this._filteredShowId.set(id);
|
|
921
|
-
}
|
|
922
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: PerformancesListEventsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
923
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: PerformancesListEventsService, providedIn: 'root' });
|
|
924
|
-
}
|
|
925
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: PerformancesListEventsService, decorators: [{
|
|
926
|
-
type: Injectable,
|
|
927
|
-
args: [{ providedIn: 'root' }]
|
|
928
|
-
}] });
|
|
929
|
-
|
|
930
904
|
class ProductService {
|
|
931
905
|
apiService;
|
|
932
906
|
productsSubject = new BehaviorSubject([]);
|
|
@@ -1240,7 +1214,7 @@ class AppButtonComponent {
|
|
|
1240
1214
|
return `${BASE_BUTTON_CLASSES} ${disabledClasses} ${variantClasses} ${loadingClasses} ${sizeClasses}`;
|
|
1241
1215
|
}
|
|
1242
1216
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: AppButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1243
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: AppButtonComponent, isStandalone: true, selector: "app-button", inputs: { disabled: "disabled", loading: "loading", type: "type", variant: "variant", text: "text", size: "size", loadingText: "loadingText", icon: "icon" }, outputs: { clicked: "clicked" }, ngImport: i0, template: "<button\n [type]=\"type\"\n [disabled]=\"loading || disabled\"\n class=\"{{ buttonClasses }}\"\n (click)=\"handleClick()\"\n>\n @if (icon && !loading) {\n <i class=\"{{ icon }}\"></i>\n }\n\n @if (loading) {\n <i class=\"ri-refresh-line animate-spin\"></i>\n }\n\n {{ loading ? loadingText : text }}\n</button>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }], encapsulation: i0.ViewEncapsulation.None });
|
|
1217
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: AppButtonComponent, isStandalone: true, selector: "app-button", inputs: { disabled: "disabled", loading: "loading", type: "type", variant: "variant", text: "text", size: "size", loadingText: "loadingText", icon: "icon" }, outputs: { clicked: "clicked" }, ngImport: i0, template: "<button\n [type]=\"type\"\n [disabled]=\"loading || disabled\"\n class=\"{{ buttonClasses }}\"\n (click)=\"handleClick()\"\n>\n @if (icon && !loading) {\n <i class=\"{{ icon }}\"></i>\n }\n\n @if (loading) {\n <i class=\"ri-refresh-line animate-spin\"></i>\n }\n\n {{ loading ? loadingText : text }}\n</button>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }], encapsulation: i0.ViewEncapsulation.None });
|
|
1244
1218
|
}
|
|
1245
1219
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: AppButtonComponent, decorators: [{
|
|
1246
1220
|
type: Component,
|
|
@@ -1285,11 +1259,11 @@ class AppLinkButtonComponent {
|
|
|
1285
1259
|
return [BASE_BUTTON_CLASSES, disabledClasses, variantClasses, loadingClasses, sizeClasses].join(' ');
|
|
1286
1260
|
}
|
|
1287
1261
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: AppLinkButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1288
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: AppLinkButtonComponent, isStandalone: true, selector: "app-link-button", inputs: { disabled: "disabled", loading: "loading", target: "target", text: "text", icon: "icon", loadingText: "loadingText", route: "route", queryParams: "queryParams", size: "size", variant: "variant" }, ngImport: i0, template: "<a
|
|
1262
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: AppLinkButtonComponent, isStandalone: true, selector: "app-link-button", inputs: { disabled: "disabled", loading: "loading", target: "target", text: "text", icon: "icon", loadingText: "loadingText", route: "route", queryParams: "queryParams", size: "size", variant: "variant" }, ngImport: i0, template: "<a class=\"{{ buttonClasses }}\" [routerLink]=\"!disabled ? route : null\" [queryParams]=\"queryParams\" [target]=\"target\">\n @if (icon) {\n <i [class]=\"icon\"></i>\n }\n\n {{ loading ? loadingText : text }}\n</a>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: TranslocoModule }], encapsulation: i0.ViewEncapsulation.None });
|
|
1289
1263
|
}
|
|
1290
1264
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: AppLinkButtonComponent, decorators: [{
|
|
1291
1265
|
type: Component,
|
|
1292
|
-
args: [{ selector: 'app-link-button', standalone: true, imports: [CommonModule, RouterLink, TranslocoModule], encapsulation: ViewEncapsulation.None, template: "<a
|
|
1266
|
+
args: [{ selector: 'app-link-button', standalone: true, imports: [CommonModule, RouterLink, TranslocoModule], encapsulation: ViewEncapsulation.None, template: "<a class=\"{{ buttonClasses }}\" [routerLink]=\"!disabled ? route : null\" [queryParams]=\"queryParams\" [target]=\"target\">\n @if (icon) {\n <i [class]=\"icon\"></i>\n }\n\n {{ loading ? loadingText : text }}\n</a>\n" }]
|
|
1293
1267
|
}], propDecorators: { disabled: [{
|
|
1294
1268
|
type: Input
|
|
1295
1269
|
}], loading: [{
|
|
@@ -1330,7 +1304,7 @@ class AppAlertComponent {
|
|
|
1330
1304
|
return ALERT_ICONS[this.type] ?? ALERT_ICONS.info;
|
|
1331
1305
|
}
|
|
1332
1306
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: AppAlertComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1333
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: AppAlertComponent, isStandalone: true, selector: "app-alert", inputs: { type: "type", text: "text", closeable: "closeable", size: "size" }, ngImport: i0, template: "<div class=\"{{ alertClasses }}\" role=\"alert\">\n <div class=\"flex items-center gap-2\">\n <i class=\"{{ alertIcon }}\"></i>\n <span>{{ text }}</span>\n </div>\n\n @if (closeable) {\n <span\n class=\"absolute top-0 bottom-0 right-0 h-full w-8 flex items-center justify-center cursor-pointer\"\n >\n <i class=\"ri-close-line\"></i>\n </span>\n }\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }], encapsulation: i0.ViewEncapsulation.None });
|
|
1307
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: AppAlertComponent, isStandalone: true, selector: "app-alert", inputs: { type: "type", text: "text", closeable: "closeable", size: "size" }, ngImport: i0, template: "<div class=\"{{ alertClasses }}\" role=\"alert\">\n <div class=\"flex items-center gap-2\">\n <i class=\"{{ alertIcon }}\"></i>\n <span>{{ text }}</span>\n </div>\n\n @if (closeable) {\n <span\n class=\"absolute top-0 bottom-0 right-0 h-full w-8 flex items-center justify-center cursor-pointer\"\n >\n <i class=\"ri-close-line\"></i>\n </span>\n }\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }], encapsulation: i0.ViewEncapsulation.None });
|
|
1334
1308
|
}
|
|
1335
1309
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: AppAlertComponent, decorators: [{
|
|
1336
1310
|
type: Component,
|
|
@@ -1351,30 +1325,17 @@ class AppModalComponent {
|
|
|
1351
1325
|
isOpen = signal(false, ...(ngDevMode ? [{ debugName: "isOpen" }] : []));
|
|
1352
1326
|
size = 'md';
|
|
1353
1327
|
closeModal = new EventEmitter();
|
|
1354
|
-
SIZE_CLASSES = {
|
|
1355
|
-
xs: 'max-w-xs',
|
|
1356
|
-
sm: 'max-w-sm',
|
|
1357
|
-
md: 'max-w-md',
|
|
1358
|
-
lg: 'max-w-lg',
|
|
1359
|
-
xl: 'max-w-xl',
|
|
1360
|
-
'2xl': 'max-w-2xl',
|
|
1361
|
-
'3xl': 'max-w-3xl',
|
|
1362
|
-
'4xl': 'max-w-4xl',
|
|
1363
|
-
};
|
|
1364
|
-
get sizeClass() {
|
|
1365
|
-
return this.SIZE_CLASSES[this.size] ?? 'max-w-md';
|
|
1366
|
-
}
|
|
1367
1328
|
onCloseModal() {
|
|
1368
1329
|
if (this.disableClose)
|
|
1369
1330
|
return;
|
|
1370
1331
|
this.closeModal.emit();
|
|
1371
1332
|
}
|
|
1372
1333
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: AppModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1373
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: AppModalComponent, isStandalone: true, selector: "app-modal", inputs: { title: "title", disableClose: "disableClose", isOpen: "isOpen", size: "size" }, outputs: { closeModal: "closeModal" }, ngImport: i0, template: "@if (isOpen()) {\n <div class=\"fixed inset-0 flex items-center justify-center z-50\">\n <div class=\"absolute inset-0 bg-black opacity-50\" (click)=\"onCloseModal()\"></div>\n\n <div\n [class]=\"
|
|
1334
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: AppModalComponent, isStandalone: true, selector: "app-modal", inputs: { title: "title", disableClose: "disableClose", isOpen: "isOpen", size: "size" }, outputs: { closeModal: "closeModal" }, ngImport: i0, template: "@if (isOpen()) {\n <div class=\"fixed inset-0 flex items-center justify-center z-50\">\n <div class=\"absolute inset-0 bg-black opacity-50\" (click)=\"onCloseModal()\"></div>\n\n <div\n [class]=\"`bg-white rounded-lg max-h-screen overflow-y-auto shadow-xl relative z-10 max-w-${size} w-full`\"\n >\n @if (!disableClose || !!title) {\n <div class=\"flex justify-between items-center p-5 border-b border-gray-200\">\n <h3 class=\"text-lg font-semibold text-gray-800 m-0\">{{ title }}</h3>\n\n @if (!disableClose) {\n <button\n class=\"bg-none border-none text-2xl cursor-pointer text-gray-600 p-0 w-7.5 h-7.5 flex items-center justify-center hover:text-gray-800\"\n (click)=\"onCloseModal()\"\n >\n ×\n </button>\n }\n </div>\n }\n\n <div class=\"p-5\">\n <ng-content></ng-content>\n </div>\n </div>\n </div>\n}\n", styles: [".max-w-xl{max-width:36rem}.max-w-2xl{max-width:42rem}.max-w-3xl{max-width:48rem}.max-w-4xl{max-width:56rem}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }], encapsulation: i0.ViewEncapsulation.None });
|
|
1374
1335
|
}
|
|
1375
1336
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: AppModalComponent, decorators: [{
|
|
1376
1337
|
type: Component,
|
|
1377
|
-
args: [{ selector: 'app-modal', standalone: true, imports: [CommonModule], encapsulation: ViewEncapsulation.None, template: "@if (isOpen()) {\n <div class=\"fixed inset-0 flex items-center justify-center z-50\">\n <div class=\"absolute inset-0 bg-black opacity-50\" (click)=\"onCloseModal()\"></div>\n\n <div\n [class]=\"
|
|
1338
|
+
args: [{ selector: 'app-modal', standalone: true, imports: [CommonModule], encapsulation: ViewEncapsulation.None, template: "@if (isOpen()) {\n <div class=\"fixed inset-0 flex items-center justify-center z-50\">\n <div class=\"absolute inset-0 bg-black opacity-50\" (click)=\"onCloseModal()\"></div>\n\n <div\n [class]=\"`bg-white rounded-lg max-h-screen overflow-y-auto shadow-xl relative z-10 max-w-${size} w-full`\"\n >\n @if (!disableClose || !!title) {\n <div class=\"flex justify-between items-center p-5 border-b border-gray-200\">\n <h3 class=\"text-lg font-semibold text-gray-800 m-0\">{{ title }}</h3>\n\n @if (!disableClose) {\n <button\n class=\"bg-none border-none text-2xl cursor-pointer text-gray-600 p-0 w-7.5 h-7.5 flex items-center justify-center hover:text-gray-800\"\n (click)=\"onCloseModal()\"\n >\n ×\n </button>\n }\n </div>\n }\n\n <div class=\"p-5\">\n <ng-content></ng-content>\n </div>\n </div>\n </div>\n}\n", styles: [".max-w-xl{max-width:36rem}.max-w-2xl{max-width:42rem}.max-w-3xl{max-width:48rem}.max-w-4xl{max-width:56rem}\n"] }]
|
|
1378
1339
|
}], propDecorators: { title: [{
|
|
1379
1340
|
type: Input
|
|
1380
1341
|
}], disableClose: [{
|
|
@@ -1501,7 +1462,7 @@ class FormInputComponent {
|
|
|
1501
1462
|
return baseClasses;
|
|
1502
1463
|
}
|
|
1503
1464
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: FormInputComponent, deps: [{ token: i1$1.NgControl, optional: true, self: true }, { token: i2.TranslocoService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1504
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: FormInputComponent, isStandalone: true, selector: "form-input", inputs: { label: "label", type: "type", name: "name", id: "id", placeholder: "placeholder", required: "required", readonly: "readonly", minlength: "minlength", min: "min", step: "step", pattern: "pattern", fieldGroupClass: "fieldGroupClass", autocomplete: "autocomplete" }, ngImport: i0, template: "<div [class]=\"fieldGroupClasses\">\n @if (label) {\n <label [for]=\"inputId\" class=\"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1\">\n {{ label }}\n\n @if (required) {\n <span class=\"text-red-500\">*</span>\n }\n </label>\n }\n\n <div class=\"relative\">\n <input\n [type]=\"type\"\n [id]=\"inputId\"\n [name]=\"name\"\n [placeholder]=\"placeholder\"\n [required]=\"required\"\n [minlength]=\"minlength\"\n [pattern]=\"pattern || ''\"\n [(ngModel)]=\"value\"\n (ngModelChange)=\"onInput($event)\"\n (blur)=\"onTouched()\"\n [readonly]=\"readonly\"\n [disabled]=\"disabled\"\n [class.bg-white]=\"!readonly\"\n [class.bg-gray-200]=\"readonly\"\n [class.cursor-not-allowed]=\"readonly\"\n [class]=\"inputClasses\"\n [autocomplete]=\"autocomplete\"\n [min]=\"min\"\n [step]=\"step\"\n />\n </div>\n\n @if (showError) {\n <div class=\"text-red-500 text-xs mt-1\">\n {{ errorMessage }}\n </div>\n }\n</div>\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$1.MinLengthValidator, selector: "[minlength][formControlName],[minlength][formControl],[minlength][ngModel]", inputs: ["minlength"] }, { kind: "directive", type: i1$1.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }] });
|
|
1465
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: FormInputComponent, isStandalone: true, selector: "form-input", inputs: { label: "label", type: "type", name: "name", id: "id", placeholder: "placeholder", required: "required", readonly: "readonly", minlength: "minlength", min: "min", step: "step", pattern: "pattern", fieldGroupClass: "fieldGroupClass", autocomplete: "autocomplete" }, ngImport: i0, template: "<div [class]=\"fieldGroupClasses\">\n @if (label) {\n <label [for]=\"inputId\" class=\"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1\">\n {{ label }}\n\n @if (required) {\n <span class=\"text-red-500\">*</span>\n }\n </label>\n }\n\n <div class=\"relative\">\n <input\n [type]=\"type\"\n [id]=\"inputId\"\n [name]=\"name\"\n [placeholder]=\"placeholder\"\n [required]=\"required\"\n [minlength]=\"minlength\"\n [pattern]=\"pattern || ''\"\n [(ngModel)]=\"value\"\n (ngModelChange)=\"onInput($event)\"\n (blur)=\"onTouched()\"\n [readonly]=\"readonly\"\n [disabled]=\"disabled\"\n [class.bg-white]=\"!readonly\"\n [class.bg-gray-200]=\"readonly\"\n [class.cursor-not-allowed]=\"readonly\"\n [class]=\"inputClasses\"\n [autocomplete]=\"autocomplete\"\n [min]=\"min\"\n [step]=\"step\"\n />\n </div>\n\n @if (showError) {\n <div class=\"text-red-500 text-xs mt-1\">\n {{ errorMessage }}\n </div>\n }\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$1.MinLengthValidator, selector: "[minlength][formControlName],[minlength][formControl],[minlength][ngModel]", inputs: ["minlength"] }, { kind: "directive", type: i1$1.PatternValidator, selector: "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", inputs: ["pattern"] }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }] });
|
|
1505
1466
|
}
|
|
1506
1467
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: FormInputComponent, decorators: [{
|
|
1507
1468
|
type: Component,
|
|
@@ -1599,7 +1560,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
1599
1560
|
class AuditInformationComponent {
|
|
1600
1561
|
data = null;
|
|
1601
1562
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: AuditInformationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1602
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: AuditInformationComponent, isStandalone: true, selector: "app-audit-information", inputs: { data: "data" }, ngImport: i0, template: "@if (data) {\n <div class=\"w-full bg-white rounded-lg shadow-lg overflow-hidden\">\n <div class=\"border-b border-gray-200 last:border-b-0\">\n <div class=\"flex items-center justify-between p-4 bg-gray-50 border-b border-gray-200\">\n <p class=\"text-sm font-semibold\">Informaci\u00F3n de auditoria</p>\n </div>\n\n <div class=\"p-4 w-full\">\n <ul class=\"flex flex-col gap-4 list-none p-0 m-0 w-full text-xs\">\n <li class=\"flex flex-col items-start\">\n <span class=\"font-bold\">Fecha de creaci\u00F3n:</span>\n <span>{{ data.created_at | date: 'medium' }}</span>\n </li>\n\n @if (data.created_by_admin) {\n <li class=\"flex flex-col items-start\">\n <span class=\"font-bold\">Creado por:</span>\n <span>\n {{ data.created_by_admin.first_name }} - {{ data.created_by_admin.email }}\n </span>\n </li>\n }\n\n @if (data.updated_at) {\n <li class=\"flex flex-col items-start\">\n <span class=\"font-bold\">\u00DAltima actualizaci\u00F3n:</span>\n <span>{{ data.updated_at | date: 'medium' }}</span>\n </li>\n }\n\n @if (data.updated_by_admin) {\n <li class=\"flex flex-col items-start\">\n <span class=\"font-bold\">Actualizado por:</span>\n <span>\n {{ data.updated_by_admin.first_name }} - {{ data.updated_by_admin.email }}\n </span>\n </li>\n }\n\n @if (data.is_published && data.published_at) {\n <li class=\"flex flex-col items-start\">\n <span class=\"font-bold\">Fecha de publicaci\u00F3n:</span>\n <span>{{ data.published_at | date: 'medium' }}</span>\n </li>\n }\n\n @if (data.is_published && data.published_by_admin) {\n <li class=\"flex flex-col items-start\">\n <span class=\"font-bold\">Publicado por:</span>\n <span>\n {{ data.published_by_admin.first_name }} - {{ data.published_by_admin.email }}\n </span>\n </li>\n }\n </ul>\n </div>\n </div>\n </div>\n}\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type:
|
|
1563
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: AuditInformationComponent, isStandalone: true, selector: "app-audit-information", inputs: { data: "data" }, ngImport: i0, template: "@if (data) {\n <div class=\"w-full bg-white rounded-lg shadow-lg overflow-hidden\">\n <div class=\"border-b border-gray-200 last:border-b-0\">\n <div class=\"flex items-center justify-between p-4 bg-gray-50 border-b border-gray-200\">\n <p class=\"text-sm font-semibold\">Informaci\u00F3n de auditoria</p>\n </div>\n\n <div class=\"p-4 w-full\">\n <ul class=\"flex flex-col gap-4 list-none p-0 m-0 w-full text-xs\">\n <li class=\"flex flex-col items-start\">\n <span class=\"font-bold\">Fecha de creaci\u00F3n:</span>\n <span>{{ data.created_at | date: 'medium' }}</span>\n </li>\n\n @if (data.created_by_admin) {\n <li class=\"flex flex-col items-start\">\n <span class=\"font-bold\">Creado por:</span>\n <span>\n {{ data.created_by_admin.first_name }} - {{ data.created_by_admin.email }}\n </span>\n </li>\n }\n\n @if (data.updated_at) {\n <li class=\"flex flex-col items-start\">\n <span class=\"font-bold\">\u00DAltima actualizaci\u00F3n:</span>\n <span>{{ data.updated_at | date: 'medium' }}</span>\n </li>\n }\n\n @if (data.updated_by_admin) {\n <li class=\"flex flex-col items-start\">\n <span class=\"font-bold\">Actualizado por:</span>\n <span>\n {{ data.updated_by_admin.first_name }} - {{ data.updated_by_admin.email }}\n </span>\n </li>\n }\n\n @if (data.is_published && data.published_at) {\n <li class=\"flex flex-col items-start\">\n <span class=\"font-bold\">Fecha de publicaci\u00F3n:</span>\n <span>{{ data.published_at | date: 'medium' }}</span>\n </li>\n }\n\n @if (data.is_published && data.published_by_admin) {\n <li class=\"flex flex-col items-start\">\n <span class=\"font-bold\">Publicado por:</span>\n <span>\n {{ data.published_by_admin.first_name }} - {{ data.published_by_admin.email }}\n </span>\n </li>\n }\n </ul>\n </div>\n </div>\n </div>\n}\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1$2.DatePipe, name: "date" }] });
|
|
1603
1564
|
}
|
|
1604
1565
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: AuditInformationComponent, decorators: [{
|
|
1605
1566
|
type: Component,
|
|
@@ -1652,7 +1613,7 @@ class DynamicTableComponent {
|
|
|
1652
1613
|
});
|
|
1653
1614
|
}
|
|
1654
1615
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: DynamicTableComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
|
1655
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: DynamicTableComponent, isStandalone: true, selector: "dynamic-table", inputs: { title: "title", data: "data", headers: "headers", columnComponents: "columnComponents", isLoading: "isLoading", totalItems: "totalItems", itemsPerPage: "itemsPerPage", currentPage: "currentPage", showPagination: "showPagination", showSearch: "showSearch", showTitle: "showTitle" }, outputs: { pageChange: "pageChange", searchChange: "searchChange" }, ngImport: i0, template: "<div\n class=\"bg-white rounded-lg overflow-hidden border border-gray-200 dark:bg-gray-800 dark:border-gray-700\"\n>\n @if (showTitle || showSearch) {\n <div class=\"p-4 border-b border-gray-200 flex items-center justify-start dark:border-gray-700\">\n @if (showTitle) {\n <h2 class=\"text-lg font-semibold dark:text-white\">{{ title }}</h2>\n }\n\n @if (showSearch) {\n <input\n type=\"text\"\n (input)=\"onSearch($event)\"\n placeholder=\"Buscar...\"\n class=\"ml-auto block w-sm rounded-md bg-white px-3 py-1.5 text-base text-gray-900 outline-1 -outline-offset-1 outline-gray-300 placeholder:text-gray-400 focus:outline-2 focus:-outline-offset-2 focus:outline-indigo-600 sm:text-sm/6 dark:bg-white/5 dark:text-white dark:outline-white/10 dark:placeholder:text-gray-500 dark:focus:outline-indigo-500\"\n />\n }\n </div>\n }\n\n <div class=\"overflow-x-auto\">\n <table class=\"w-full text-left border-collapse\">\n <thead class=\"bg-gray-100 text-gray-600 text-xs dark:bg-gray-700 dark:text-gray-300\">\n <tr>\n @for (header of headers; track header.key) {\n <th class=\"p-3 border-b border-gray-300 whitespace-nowrap dark:border-gray-600\">\n {{ header.label }}\n </th>\n }\n </tr>\n </thead>\n\n <tbody class=\"text-gray-700 text-xs dark:text-gray-200\">\n @if (isLoading) {\n <tr\n class=\"border-b even:bg-gray-100 border-gray-200 last:border-none transition-colors dark:even:bg-gray-700/50 dark:border-gray-700\"\n >\n @for (header of headers; track header.key) {\n <td class=\"p-3\">\n <div class=\"h-5 bg-gray-200 rounded animate-pulse w-full dark:bg-gray-600\"></div>\n </td>\n }\n </tr>\n }\n\n @for (row of data; track row) {\n <tr\n class=\"hover:bg-gray-200 border-b even:bg-gray-100 border-gray-200 last:border-none transition-colors dark:hover:bg-gray-700 dark:even:bg-gray-700/50 dark:border-gray-700\"\n >\n @for (header of headers; track header.key) {\n <td class=\"p-3 whitespace-nowrap\">\n @if (columnComponents[header.key]) {\n <ng-container\n *ngComponentOutlet=\"columnComponents[header.key]; injector: createInjector(row)\"\n ></ng-container>\n } @else {\n {{ row[header.key] || '---' }}\n }\n </td>\n }\n </tr>\n }\n\n @if ((!data || data.length < 1) && !isLoading) {\n <tr>\n <td\n [attr.colspan]=\"headers.length\"\n class=\"p-6 text-center text-gray-400 italic dark:text-gray-500\"\n >\n No se encontraron registros en el servidor.\n </td>\n </tr>\n }\n </tbody>\n </table>\n </div>\n\n @if (showPagination) {\n <div\n class=\"p-4 flex items-center justify-between bg-gray-50 border-gray-300 border-t dark:bg-gray-800/50 dark:border-gray-700\"\n >\n <div class=\"text-sm text-gray-500 dark:text-gray-400\">\n Mostrando p\u00E1gina\n <span class=\"font-semibold text-gray-800 dark:text-white\">{{ currentPage }}</span> de\n <span class=\"font-semibold text-gray-800 dark:text-white\">{{ totalPages }}</span>\n <span class=\"ml-1\">({{ totalItems }} registros totales)</span>\n </div>\n\n <div class=\"flex gap-2\">\n <button\n (click)=\"changePage(-1)\"\n [disabled]=\"currentPage === 1\"\n class=\"flex items-center px-4 py-2 border rounded-lg bg-white text-sm font-medium hover:bg-gray-100 disabled:opacity-40 disabled:cursor-not-allowed transition-all dark:bg-gray-700 dark:hover:bg-gray-600 dark:border-gray-600 dark:text-white\"\n >\n Anterior\n </button>\n <button\n (click)=\"changePage(1)\"\n [disabled]=\"currentPage >= totalPages\"\n class=\"flex items-center px-4 py-2 border rounded-lg bg-white text-sm font-medium hover:bg-gray-100 disabled:opacity-40 disabled:cursor-not-allowed transition-all dark:bg-gray-700 dark:hover:bg-gray-600 dark:border-gray-600 dark:text-white\"\n >\n Siguiente\n </button>\n </div>\n </div>\n }\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type:
|
|
1616
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: DynamicTableComponent, isStandalone: true, selector: "dynamic-table", inputs: { title: "title", data: "data", headers: "headers", columnComponents: "columnComponents", isLoading: "isLoading", totalItems: "totalItems", itemsPerPage: "itemsPerPage", currentPage: "currentPage", showPagination: "showPagination", showSearch: "showSearch", showTitle: "showTitle" }, outputs: { pageChange: "pageChange", searchChange: "searchChange" }, ngImport: i0, template: "<div\n class=\"bg-white rounded-lg overflow-hidden border border-gray-200 dark:bg-gray-800 dark:border-gray-700\"\n>\n @if (showTitle || showSearch) {\n <div class=\"p-4 border-b border-gray-200 flex items-center justify-start dark:border-gray-700\">\n @if (showTitle) {\n <h2 class=\"text-lg font-semibold dark:text-white\">{{ title }}</h2>\n }\n\n @if (showSearch) {\n <input\n type=\"text\"\n (input)=\"onSearch($event)\"\n placeholder=\"Buscar...\"\n class=\"ml-auto block w-sm rounded-md bg-white px-3 py-1.5 text-base text-gray-900 outline-1 -outline-offset-1 outline-gray-300 placeholder:text-gray-400 focus:outline-2 focus:-outline-offset-2 focus:outline-indigo-600 sm:text-sm/6 dark:bg-white/5 dark:text-white dark:outline-white/10 dark:placeholder:text-gray-500 dark:focus:outline-indigo-500\"\n />\n }\n </div>\n }\n\n <div class=\"overflow-x-auto\">\n <table class=\"w-full text-left border-collapse\">\n <thead class=\"bg-gray-100 text-gray-600 text-xs dark:bg-gray-700 dark:text-gray-300\">\n <tr>\n @for (header of headers; track header.key) {\n <th class=\"p-3 border-b border-gray-300 whitespace-nowrap dark:border-gray-600\">\n {{ header.label }}\n </th>\n }\n </tr>\n </thead>\n\n <tbody class=\"text-gray-700 text-xs dark:text-gray-200\">\n @if (isLoading) {\n <tr\n class=\"border-b even:bg-gray-100 border-gray-200 last:border-none transition-colors dark:even:bg-gray-700/50 dark:border-gray-700\"\n >\n @for (header of headers; track header.key) {\n <td class=\"p-3\">\n <div class=\"h-5 bg-gray-200 rounded animate-pulse w-full dark:bg-gray-600\"></div>\n </td>\n }\n </tr>\n }\n\n @for (row of data; track row) {\n <tr\n class=\"hover:bg-gray-200 border-b even:bg-gray-100 border-gray-200 last:border-none transition-colors dark:hover:bg-gray-700 dark:even:bg-gray-700/50 dark:border-gray-700\"\n >\n @for (header of headers; track header.key) {\n <td class=\"p-3 whitespace-nowrap\">\n @if (columnComponents[header.key]) {\n <ng-container\n *ngComponentOutlet=\"columnComponents[header.key]; injector: createInjector(row)\"\n ></ng-container>\n } @else {\n {{ row[header.key] || '---' }}\n }\n </td>\n }\n </tr>\n }\n\n @if ((!data || data.length < 1) && !isLoading) {\n <tr>\n <td\n [attr.colspan]=\"headers.length\"\n class=\"p-6 text-center text-gray-400 italic dark:text-gray-500\"\n >\n No se encontraron registros en el servidor.\n </td>\n </tr>\n }\n </tbody>\n </table>\n </div>\n\n @if (showPagination) {\n <div\n class=\"p-4 flex items-center justify-between bg-gray-50 border-gray-300 border-t dark:bg-gray-800/50 dark:border-gray-700\"\n >\n <div class=\"text-sm text-gray-500 dark:text-gray-400\">\n Mostrando p\u00E1gina\n <span class=\"font-semibold text-gray-800 dark:text-white\">{{ currentPage }}</span> de\n <span class=\"font-semibold text-gray-800 dark:text-white\">{{ totalPages }}</span>\n <span class=\"ml-1\">({{ totalItems }} registros totales)</span>\n </div>\n\n <div class=\"flex gap-2\">\n <button\n (click)=\"changePage(-1)\"\n [disabled]=\"currentPage === 1\"\n class=\"flex items-center px-4 py-2 border rounded-lg bg-white text-sm font-medium hover:bg-gray-100 disabled:opacity-40 disabled:cursor-not-allowed transition-all dark:bg-gray-700 dark:hover:bg-gray-600 dark:border-gray-600 dark:text-white\"\n >\n Anterior\n </button>\n <button\n (click)=\"changePage(1)\"\n [disabled]=\"currentPage >= totalPages\"\n class=\"flex items-center px-4 py-2 border rounded-lg bg-white text-sm font-medium hover:bg-gray-100 disabled:opacity-40 disabled:cursor-not-allowed transition-all dark:bg-gray-700 dark:hover:bg-gray-600 dark:border-gray-600 dark:text-white\"\n >\n Siguiente\n </button>\n </div>\n </div>\n }\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"], exportAs: ["ngComponentOutlet"] }] });
|
|
1656
1617
|
}
|
|
1657
1618
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: DynamicTableComponent, decorators: [{
|
|
1658
1619
|
type: Component,
|
|
@@ -1713,7 +1674,7 @@ class LanguageSwitcherComponent {
|
|
|
1713
1674
|
</button>
|
|
1714
1675
|
}
|
|
1715
1676
|
</div>
|
|
1716
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: TranslocoModule }, { kind: "pipe", type:
|
|
1677
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: TranslocoModule }, { kind: "pipe", type: i1$2.UpperCasePipe, name: "uppercase" }] });
|
|
1717
1678
|
}
|
|
1718
1679
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: LanguageSwitcherComponent, decorators: [{
|
|
1719
1680
|
type: Component,
|
|
@@ -1933,7 +1894,7 @@ class FormTextareaComponent {
|
|
|
1933
1894
|
return baseClasses;
|
|
1934
1895
|
}
|
|
1935
1896
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: FormTextareaComponent, deps: [{ token: i1$1.NgControl, optional: true, self: true }, { token: i2.TranslocoService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1936
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: FormTextareaComponent, isStandalone: true, selector: "form-textarea", inputs: { label: "label", name: "name", id: "id", placeholder: "placeholder", required: "required", readonly: "readonly", minlength: "minlength", maxlength: "maxlength", rows: "rows", cols: "cols", fieldGroupClass: "fieldGroupClass" }, ngImport: i0, template: "<div [class]=\"fieldGroupClasses\">\n @if (label) {\n <label [for]=\"inputId\" class=\"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1\">\n {{ label }}\n\n @if (required) {\n <span class=\"text-red-500\">*</span>\n }\n </label>\n }\n\n <div class=\"relative\">\n <textarea\n [id]=\"inputId\"\n [name]=\"name\"\n [placeholder]=\"placeholder\"\n [required]=\"required\"\n [minlength]=\"minlength\"\n [maxlength]=\"maxlength\"\n [rows]=\"rows\"\n [cols]=\"cols\"\n [(ngModel)]=\"value\"\n (ngModelChange)=\"onInput($event)\"\n (blur)=\"onTouched()\"\n [readonly]=\"readonly\"\n [disabled]=\"disabled\"\n [class.bg-white]=\"!readonly\"\n [class.bg-gray-200]=\"readonly\"\n [class.cursor-not-allowed]=\"readonly\"\n [class]=\"inputClasses\"\n ></textarea>\n </div>\n\n @if (showError) {\n <div class=\"text-red-500 text-xs mt-1\">\n {{ errorMessage }}\n </div>\n }\n</div>\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$1.MinLengthValidator, selector: "[minlength][formControlName],[minlength][formControl],[minlength][ngModel]", inputs: ["minlength"] }, { kind: "directive", type: i1$1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }] });
|
|
1897
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: FormTextareaComponent, isStandalone: true, selector: "form-textarea", inputs: { label: "label", name: "name", id: "id", placeholder: "placeholder", required: "required", readonly: "readonly", minlength: "minlength", maxlength: "maxlength", rows: "rows", cols: "cols", fieldGroupClass: "fieldGroupClass" }, ngImport: i0, template: "<div [class]=\"fieldGroupClasses\">\n @if (label) {\n <label [for]=\"inputId\" class=\"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1\">\n {{ label }}\n\n @if (required) {\n <span class=\"text-red-500\">*</span>\n }\n </label>\n }\n\n <div class=\"relative\">\n <textarea\n [id]=\"inputId\"\n [name]=\"name\"\n [placeholder]=\"placeholder\"\n [required]=\"required\"\n [minlength]=\"minlength\"\n [maxlength]=\"maxlength\"\n [rows]=\"rows\"\n [cols]=\"cols\"\n [(ngModel)]=\"value\"\n (ngModelChange)=\"onInput($event)\"\n (blur)=\"onTouched()\"\n [readonly]=\"readonly\"\n [disabled]=\"disabled\"\n [class.bg-white]=\"!readonly\"\n [class.bg-gray-200]=\"readonly\"\n [class.cursor-not-allowed]=\"readonly\"\n [class]=\"inputClasses\"\n ></textarea>\n </div>\n\n @if (showError) {\n <div class=\"text-red-500 text-xs mt-1\">\n {{ errorMessage }}\n </div>\n }\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$1.MinLengthValidator, selector: "[minlength][formControlName],[minlength][formControl],[minlength][ngModel]", inputs: ["minlength"] }, { kind: "directive", type: i1$1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }] });
|
|
1937
1898
|
}
|
|
1938
1899
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: FormTextareaComponent, decorators: [{
|
|
1939
1900
|
type: Component,
|
|
@@ -2059,7 +2020,7 @@ class FormEditorComponent {
|
|
|
2059
2020
|
return baseClasses;
|
|
2060
2021
|
}
|
|
2061
2022
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: FormEditorComponent, deps: [{ token: i1$1.NgControl, optional: true, self: true }, { token: i2.TranslocoService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2062
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: FormEditorComponent, isStandalone: true, selector: "form-editor", inputs: { label: "label", name: "name", id: "id", placeholder: "placeholder", required: "required", readonly: "readonly", toolbar: "toolbar", fieldGroupClass: "fieldGroupClass" }, ngImport: i0, template: "<div [class]=\"fieldGroupClasses\">\n @if (label) {\n <label [for]=\"inputId\" class=\"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1\">\n {{ label }}\n\n @if (required) {\n <span class=\"text-red-500\">*</span>\n }\n </label>\n }\n\n <div\n class=\"relative\"\n [class.opacity-50]=\"disabled\"\n [class.pointer-events-none]=\"disabled\"\n [class.cursor-not-allowed]=\"disabled\"\n >\n <ngx-editor [editor]=\"editor\" outputFormat=\"html\" [placeholder]=\"placeholder\">\n <ngx-editor-menu\n [editor]=\"editor\"\n [toolbar]=\"toolbar\"\n [disabled]=\"disabled\"\n ></ngx-editor-menu>\n </ngx-editor>\n </div>\n\n @if (showError) {\n <div class=\"text-red-500 text-xs mt-1\">\n {{ errorMessage }}\n </div>\n }\n</div>\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "component", type: NgxEditorComponent, selector: "ngx-editor", inputs: ["editor", "outputFormat", "placeholder"], outputs: ["focusOut", "focusIn"] }, { kind: "component", type: NgxEditorMenuComponent, selector: "ngx-editor-menu", inputs: ["toolbar", "colorPresets", "disabled", "editor", "customMenuRef", "dropdownPlacement"] }] });
|
|
2023
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: FormEditorComponent, isStandalone: true, selector: "form-editor", inputs: { label: "label", name: "name", id: "id", placeholder: "placeholder", required: "required", readonly: "readonly", toolbar: "toolbar", fieldGroupClass: "fieldGroupClass" }, ngImport: i0, template: "<div [class]=\"fieldGroupClasses\">\n @if (label) {\n <label [for]=\"inputId\" class=\"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1\">\n {{ label }}\n\n @if (required) {\n <span class=\"text-red-500\">*</span>\n }\n </label>\n }\n\n <div\n class=\"relative\"\n [class.opacity-50]=\"disabled\"\n [class.pointer-events-none]=\"disabled\"\n [class.cursor-not-allowed]=\"disabled\"\n >\n <ngx-editor [editor]=\"editor\" outputFormat=\"html\" [placeholder]=\"placeholder\">\n <ngx-editor-menu\n [editor]=\"editor\"\n [toolbar]=\"toolbar\"\n [disabled]=\"disabled\"\n ></ngx-editor-menu>\n </ngx-editor>\n </div>\n\n @if (showError) {\n <div class=\"text-red-500 text-xs mt-1\">\n {{ errorMessage }}\n </div>\n }\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "component", type: NgxEditorComponent, selector: "ngx-editor", inputs: ["editor", "outputFormat", "placeholder"], outputs: ["focusOut", "focusIn"] }, { kind: "component", type: NgxEditorMenuComponent, selector: "ngx-editor-menu", inputs: ["toolbar", "colorPresets", "disabled", "editor", "customMenuRef", "dropdownPlacement"] }] });
|
|
2063
2024
|
}
|
|
2064
2025
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: FormEditorComponent, decorators: [{
|
|
2065
2026
|
type: Component,
|
|
@@ -2354,7 +2315,7 @@ class DateInputComponent {
|
|
|
2354
2315
|
return baseClasses;
|
|
2355
2316
|
}
|
|
2356
2317
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: DateInputComponent, deps: [{ token: i1$1.NgControl, optional: true, self: true }, { token: i2.TranslocoService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2357
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: DateInputComponent, isStandalone: true, selector: "date-input", inputs: { label: "label", type: "type", includeTime: "includeTime", name: "name", id: "id", placeholder: "placeholder", required: "required", readonly: "readonly", min: "min", max: "max", fieldGroupClass: "fieldGroupClass", dateFormat: "dateFormat" }, ngImport: i0, template: "<div [class]=\"fieldGroupClasses\">\n @if (label) {\n <label [for]=\"inputId\" class=\"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1\">\n {{ label }}\n\n @if (required) {\n <span class=\"text-red-500\">*</span>\n }\n </label>\n }\n\n <div class=\"relative\">\n <input\n [type]=\"includeTime ? 'datetime-local' : type\"\n [id]=\"inputId\"\n [name]=\"name\"\n [placeholder]=\"placeholder\"\n [required]=\"required\"\n [min]=\"min\"\n [max]=\"max\"\n [(ngModel)]=\"value\"\n (ngModelChange)=\"onInput($event)\"\n (blur)=\"onTouched()\"\n [disabled]=\"disabled\"\n [class]=\"inputClasses\"\n [readonly]=\"readonly\"\n />\n </div>\n\n @if (showError) {\n <div class=\"text-red-500 text-xs mt-1\">\n {{ errorMessage }}\n </div>\n }\n</div>\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }] });
|
|
2318
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: DateInputComponent, isStandalone: true, selector: "date-input", inputs: { label: "label", type: "type", includeTime: "includeTime", name: "name", id: "id", placeholder: "placeholder", required: "required", readonly: "readonly", min: "min", max: "max", fieldGroupClass: "fieldGroupClass", dateFormat: "dateFormat" }, ngImport: i0, template: "<div [class]=\"fieldGroupClasses\">\n @if (label) {\n <label [for]=\"inputId\" class=\"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1\">\n {{ label }}\n\n @if (required) {\n <span class=\"text-red-500\">*</span>\n }\n </label>\n }\n\n <div class=\"relative\">\n <input\n [type]=\"includeTime ? 'datetime-local' : type\"\n [id]=\"inputId\"\n [name]=\"name\"\n [placeholder]=\"placeholder\"\n [required]=\"required\"\n [min]=\"min\"\n [max]=\"max\"\n [(ngModel)]=\"value\"\n (ngModelChange)=\"onInput($event)\"\n (blur)=\"onTouched()\"\n [disabled]=\"disabled\"\n [class]=\"inputClasses\"\n [readonly]=\"readonly\"\n />\n </div>\n\n @if (showError) {\n <div class=\"text-red-500 text-xs mt-1\">\n {{ errorMessage }}\n </div>\n }\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }] });
|
|
2358
2319
|
}
|
|
2359
2320
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: DateInputComponent, decorators: [{
|
|
2360
2321
|
type: Component,
|
|
@@ -2990,7 +2951,7 @@ class AsyncSelectComponent {
|
|
|
2990
2951
|
useExisting: forwardRef(() => AsyncSelectComponent),
|
|
2991
2952
|
multi: true,
|
|
2992
2953
|
},
|
|
2993
|
-
], usesOnChanges: true, ngImport: i0, template: "<div class=\"w-full\">\n @if (label) {\n <label class=\"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1\">\n {{ label }}\n @if (required) {\n <span class=\"text-red-500\">*</span>\n }\n </label>\n }\n\n <ng-select\n [items]=\"displayItems\"\n [multiple]=\"multiple\"\n [searchable]=\"searchable\"\n [clearable]=\"clearable\"\n [placeholder]=\"placeholder\"\n [loading]=\"loading || loadingSignal()\"\n [virtualScroll]=\"virtualScroll\"\n [notFoundText]=\"notFoundText\"\n [bindLabel]=\"bindLabel\"\n [bindValue]=\"bindValue\"\n [ngModel]=\"value\"\n [typeahead]=\"typeahead$\"\n [closeOnSelect]=\"!multiple\"\n (ngModelChange)=\"onSelectChange($event)\"\n (blur)=\"onTouched()\"\n (search)=\"onSearch($event)\"\n />\n\n @if (showError) {\n <div class=\"text-red-500 text-xs mt-1\">\n {{ errorMessage }}\n </div>\n }\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: NgSelectModule }, { kind: "component", type: i2$
|
|
2954
|
+
], usesOnChanges: true, ngImport: i0, template: "<div class=\"w-full\">\n @if (label) {\n <label class=\"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1\">\n {{ label }}\n @if (required) {\n <span class=\"text-red-500\">*</span>\n }\n </label>\n }\n\n <ng-select\n [items]=\"displayItems\"\n [multiple]=\"multiple\"\n [searchable]=\"searchable\"\n [clearable]=\"clearable\"\n [placeholder]=\"placeholder\"\n [loading]=\"loading || loadingSignal()\"\n [virtualScroll]=\"virtualScroll\"\n [notFoundText]=\"notFoundText\"\n [bindLabel]=\"bindLabel\"\n [bindValue]=\"bindValue\"\n [ngModel]=\"value\"\n [typeahead]=\"typeahead$\"\n [closeOnSelect]=\"!multiple\"\n (ngModelChange)=\"onSelectChange($event)\"\n (blur)=\"onTouched()\"\n (search)=\"onSearch($event)\"\n />\n\n @if (showError) {\n <div class=\"text-red-500 text-xs mt-1\">\n {{ errorMessage }}\n </div>\n }\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: NgSelectModule }, { kind: "component", type: i2$1.NgSelectComponent, selector: "ng-select", inputs: ["ariaLabelDropdown", "ariaLabel", "markFirst", "placeholder", "fixedPlaceholder", "notFoundText", "typeToSearchText", "preventToggleOnRightClick", "addTagText", "loadingText", "clearAllText", "dropdownPosition", "appendTo", "outsideClickEvent", "loading", "closeOnSelect", "hideSelected", "selectOnTab", "openOnEnter", "maxSelectedItems", "groupBy", "groupValue", "bufferAmount", "virtualScroll", "selectableGroup", "tabFocusOnClearButton", "selectableGroupAsModel", "searchFn", "trackByFn", "clearOnBackspace", "labelForId", "inputAttrs", "tabIndex", "readonly", "searchWhileComposing", "minTermLength", "editableSearchTerm", "ngClass", "typeahead", "multiple", "addTag", "searchable", "clearable", "deselectOnClick", "clearSearchOnAdd", "compareWith", "keyDownFn", "bindLabel", "bindValue", "appearance", "isOpen", "items"], outputs: ["bindLabelChange", "bindValueChange", "appearanceChange", "isOpenChange", "itemsChange", "blur", "focus", "change", "open", "close", "search", "clear", "add", "remove", "scroll", "scrollToEnd"], exportAs: ["ngSelect"] }] });
|
|
2994
2955
|
}
|
|
2995
2956
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: AsyncSelectComponent, decorators: [{
|
|
2996
2957
|
type: Component,
|
|
@@ -4590,286 +4551,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
4590
4551
|
type: Output
|
|
4591
4552
|
}] } });
|
|
4592
4553
|
|
|
4593
|
-
class DaySelectorGridComponent {
|
|
4594
|
-
platformId;
|
|
4595
|
-
performanceService;
|
|
4596
|
-
listEventService;
|
|
4597
|
-
toastService;
|
|
4598
|
-
displayMode = 'grid';
|
|
4599
|
-
loadingData = signal(true, ...(ngDevMode ? [{ debugName: "loadingData" }] : []));
|
|
4600
|
-
days = signal([], ...(ngDevMode ? [{ debugName: "days" }] : []));
|
|
4601
|
-
carouselTrack;
|
|
4602
|
-
constructor(platformId, performanceService, listEventService, toastService) {
|
|
4603
|
-
this.platformId = platformId;
|
|
4604
|
-
this.performanceService = performanceService;
|
|
4605
|
-
this.listEventService = listEventService;
|
|
4606
|
-
this.toastService = toastService;
|
|
4607
|
-
effect(() => {
|
|
4608
|
-
this.listEventService.filteredShowId();
|
|
4609
|
-
if (isPlatformBrowser(this.platformId)) {
|
|
4610
|
-
this.days.set([]);
|
|
4611
|
-
this.listEventService.setSelectedDay(null);
|
|
4612
|
-
this.loadData();
|
|
4613
|
-
}
|
|
4614
|
-
});
|
|
4615
|
-
}
|
|
4616
|
-
loadData() {
|
|
4617
|
-
this.loadingData.set(true);
|
|
4618
|
-
const showId = this.listEventService.filteredShowId() ?? undefined;
|
|
4619
|
-
this.performanceService.fetchAvailableDays({ show_id: showId }).subscribe({
|
|
4620
|
-
next: (response) => {
|
|
4621
|
-
const days = response?.data?.days ?? [];
|
|
4622
|
-
this.days.set(days);
|
|
4623
|
-
if (days.length > 0 && !this.listEventService.selectedDay()) {
|
|
4624
|
-
this.listEventService.setSelectedDay(days[0]);
|
|
4625
|
-
}
|
|
4626
|
-
this.loadingData.set(false);
|
|
4627
|
-
},
|
|
4628
|
-
error: () => {
|
|
4629
|
-
this.toastService.show('Error al cargar los datos de la función.', 'error');
|
|
4630
|
-
this.loadingData.set(false);
|
|
4631
|
-
},
|
|
4632
|
-
});
|
|
4633
|
-
}
|
|
4634
|
-
isDayActive(day) {
|
|
4635
|
-
return day.date === this.listEventService.selectedDay()?.date;
|
|
4636
|
-
}
|
|
4637
|
-
onToggle(day) {
|
|
4638
|
-
if (this.isDayActive(day))
|
|
4639
|
-
return;
|
|
4640
|
-
this.listEventService.setSelectedPerformance(null);
|
|
4641
|
-
this.listEventService.setSelectedDay(day);
|
|
4642
|
-
}
|
|
4643
|
-
scrollCarousel(direction) {
|
|
4644
|
-
const track = this.carouselTrack?.nativeElement;
|
|
4645
|
-
if (!track)
|
|
4646
|
-
return;
|
|
4647
|
-
const item = track.children[0];
|
|
4648
|
-
const itemWidth = item?.offsetWidth ?? 112;
|
|
4649
|
-
track.scrollBy({ left: direction * (itemWidth + 8), behavior: 'smooth' });
|
|
4650
|
-
}
|
|
4651
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: DaySelectorGridComponent, deps: [{ token: PLATFORM_ID }, { token: PerformanceService }, { token: PerformancesListEventsService }, { token: ToastService }], target: i0.ɵɵFactoryTarget.Component });
|
|
4652
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: DaySelectorGridComponent, isStandalone: true, selector: "day-selector-grid", inputs: { displayMode: "displayMode" }, viewQueries: [{ propertyName: "carouselTrack", first: true, predicate: ["carouselTrack"], descendants: true }], ngImport: i0, template: "@if (loadingData()) {\n <div class=\"mt-3 grid grid-cols-4 gap-2 sm:grid-cols-10\">\n @for (i of [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; track $index) {\n <div\n class=\"h-26 border border-neutral-200 dark:border-white/10 bg-neutral-100 dark:bg-white/[0.03] rounded-xl animate-pulse w-full\"\n ></div>\n }\n </div>\n}\n\n@if (!loadingData() && days().length < 1) {\n <app-alert\n type=\"error\"\n text=\"No se encontraron funciones disponibles\"\n size=\"md\"\n [closeable]=\"false\"\n />\n}\n\n@if (days().length > 0) {\n <p class=\"text-[11px] font-semibold tracking-[0.25em] text-neutral-500 uppercase\">\n Selecciona un d\u00EDa\n </p>\n}\n\n@if (displayMode === 'carousel' && days().length > 0) {\n <div class=\"relative mt-3\">\n <button\n type=\"button\"\n (click)=\"scrollCarousel(-1)\"\n class=\"absolute left-0 top-1/2 -translate-y-1/2 z-10 flex items-center justify-center w-8 h-8 rounded-full bg-white dark:bg-neutral-800 border border-neutral-200 dark:border-white/10 shadow-sm hover:bg-neutral-100 dark:hover:bg-neutral-700 transition cursor-pointer\"\n aria-label=\"Anterior\"\n >\n <i class=\"ri-arrow-left-s-line text-lg\"></i>\n </button>\n <div\n #carouselTrack\n class=\"flex overflow-x-auto snap-x snap-mandatory gap-2 px-10 py-1 scroll-smooth [&::-webkit-scrollbar]:hidden\"\n >\n @for (item of days(); track $index) {\n <button\n (click)=\"onToggle(item)\"\n class=\"snap-start flex-shrink-0 w-28 flex flex-col items-center cursor-pointer rounded-xl border border-neutral-200 dark:border-white/10 bg-neutral-50 dark:bg-white/[0.03] px-2 py-3 transition hover:border-neutral-300 dark:hover:border-white/25 hover:bg-neutral-200 dark:hover:bg-white/[0.06] text-neutral-800 dark:text-white\"\n [class.glow-red]=\"isDayActive(item)\"\n [class.border-red-500]=\"isDayActive(item)\"\n [class.bg-red-500]=\"isDayActive(item)\"\n [class.text-white]=\"isDayActive(item)\"\n [class.hover:bg-red-600]=\"isDayActive(item)\"\n [class.dark:hover:text-white]=\"isDayActive(item)\"\n >\n <span\n class=\"text-[10px] font-semibold tracking-widest text-neutral-500 dark:text-white/80\"\n [class.text-white]=\"isDayActive(item)\"\n >\n {{ item.date | date: 'EEE' | uppercase }}\n </span>\n <span class=\"my-0.5 text-2xl font-extrabold leading-none\">\n {{ item.date | date: 'dd' }}\n </span>\n <span\n class=\"text-[10px] font-medium tracking-widest text-neutral-500 dark:text-white/80\"\n [class.text-white]=\"isDayActive(item)\"\n >\n {{ item.date | date: 'MMM' }}\n </span>\n <span\n class=\"mt-2 rounded-full bg-neutral-200 dark:bg-black/25 px-1.5 py-px text-[9px] font-semibold\"\n [class.text-red-500]=\"isDayActive(item)\"\n [class.dark:text-white]=\"isDayActive(item)\"\n >\n {{ item.count | number: '1.0-2' }}\n </span>\n </button>\n }\n </div>\n <button\n type=\"button\"\n (click)=\"scrollCarousel(1)\"\n class=\"absolute right-0 top-1/2 -translate-y-1/2 z-10 flex items-center justify-center w-8 h-8 rounded-full bg-white dark:bg-neutral-800 border border-neutral-200 dark:border-white/10 shadow-sm hover:bg-neutral-100 dark:hover:bg-neutral-700 transition cursor-pointer\"\n aria-label=\"Siguiente\"\n >\n <i class=\"ri-arrow-right-s-line text-lg\"></i>\n </button>\n </div>\n} @else {\n <div class=\"mt-3 grid grid-cols-4 gap-2 sm:grid-cols-10\">\n @for (item of days(); track $index) {\n <button\n (click)=\"onToggle(item)\"\n class=\"flex flex-col items-center cursor-pointer rounded-xl border border-neutral-200 dark:border-white/10 bg-neutral-50 dark:bg-white/[0.03] px-2 py-3 transition hover:border-neutral-300 dark:hover:border-white/25 hover:bg-neutral-200 dark:hover:bg-white/[0.06] text-neutral-800 dark:text-white\"\n [class.glow-red]=\"isDayActive(item)\"\n [class.border-red-500]=\"isDayActive(item)\"\n [class.bg-red-500]=\"isDayActive(item)\"\n [class.text-white]=\"isDayActive(item)\"\n [class.hover:bg-red-600]=\"isDayActive(item)\"\n [class.dark:hover:text-white]=\"isDayActive(item)\"\n >\n <span\n class=\"text-[10px] font-semibold tracking-widest text-neutral-500 dark:text-white/80\"\n [class.text-white]=\"isDayActive(item)\"\n >\n {{ item.date | date: 'EEE' | uppercase }}\n </span>\n <span class=\"my-0.5 text-2xl font-extrabold leading-none\">\n {{ item.date | date: 'dd' }}\n </span>\n <span\n class=\"text-[10px] font-medium tracking-widest text-neutral-500 dark:text-white/80\"\n [class.text-white]=\"isDayActive(item)\"\n >\n {{ item.date | date: 'MMM' }}\n </span>\n <span\n class=\"mt-2 rounded-full bg-neutral-200 dark:bg-black/25 px-1.5 py-px text-[9px] font-semibold\"\n [class.text-red-500]=\"isDayActive(item)\"\n [class.dark:text-white]=\"isDayActive(item)\"\n >\n {{ item.count | number: '1.0-2' }}\n </span>\n </button>\n }\n </div>\n}\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: AppAlertComponent, selector: "app-alert", inputs: ["type", "text", "closeable", "size"] }, { kind: "pipe", type: i2$1.UpperCasePipe, name: "uppercase" }, { kind: "pipe", type: i2$1.DecimalPipe, name: "number" }, { kind: "pipe", type: i2$1.DatePipe, name: "date" }] });
|
|
4653
|
-
}
|
|
4654
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: DaySelectorGridComponent, decorators: [{
|
|
4655
|
-
type: Component,
|
|
4656
|
-
args: [{ selector: 'day-selector-grid', standalone: true, imports: [CommonModule, AppAlertComponent], template: "@if (loadingData()) {\n <div class=\"mt-3 grid grid-cols-4 gap-2 sm:grid-cols-10\">\n @for (i of [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; track $index) {\n <div\n class=\"h-26 border border-neutral-200 dark:border-white/10 bg-neutral-100 dark:bg-white/[0.03] rounded-xl animate-pulse w-full\"\n ></div>\n }\n </div>\n}\n\n@if (!loadingData() && days().length < 1) {\n <app-alert\n type=\"error\"\n text=\"No se encontraron funciones disponibles\"\n size=\"md\"\n [closeable]=\"false\"\n />\n}\n\n@if (days().length > 0) {\n <p class=\"text-[11px] font-semibold tracking-[0.25em] text-neutral-500 uppercase\">\n Selecciona un d\u00EDa\n </p>\n}\n\n@if (displayMode === 'carousel' && days().length > 0) {\n <div class=\"relative mt-3\">\n <button\n type=\"button\"\n (click)=\"scrollCarousel(-1)\"\n class=\"absolute left-0 top-1/2 -translate-y-1/2 z-10 flex items-center justify-center w-8 h-8 rounded-full bg-white dark:bg-neutral-800 border border-neutral-200 dark:border-white/10 shadow-sm hover:bg-neutral-100 dark:hover:bg-neutral-700 transition cursor-pointer\"\n aria-label=\"Anterior\"\n >\n <i class=\"ri-arrow-left-s-line text-lg\"></i>\n </button>\n <div\n #carouselTrack\n class=\"flex overflow-x-auto snap-x snap-mandatory gap-2 px-10 py-1 scroll-smooth [&::-webkit-scrollbar]:hidden\"\n >\n @for (item of days(); track $index) {\n <button\n (click)=\"onToggle(item)\"\n class=\"snap-start flex-shrink-0 w-28 flex flex-col items-center cursor-pointer rounded-xl border border-neutral-200 dark:border-white/10 bg-neutral-50 dark:bg-white/[0.03] px-2 py-3 transition hover:border-neutral-300 dark:hover:border-white/25 hover:bg-neutral-200 dark:hover:bg-white/[0.06] text-neutral-800 dark:text-white\"\n [class.glow-red]=\"isDayActive(item)\"\n [class.border-red-500]=\"isDayActive(item)\"\n [class.bg-red-500]=\"isDayActive(item)\"\n [class.text-white]=\"isDayActive(item)\"\n [class.hover:bg-red-600]=\"isDayActive(item)\"\n [class.dark:hover:text-white]=\"isDayActive(item)\"\n >\n <span\n class=\"text-[10px] font-semibold tracking-widest text-neutral-500 dark:text-white/80\"\n [class.text-white]=\"isDayActive(item)\"\n >\n {{ item.date | date: 'EEE' | uppercase }}\n </span>\n <span class=\"my-0.5 text-2xl font-extrabold leading-none\">\n {{ item.date | date: 'dd' }}\n </span>\n <span\n class=\"text-[10px] font-medium tracking-widest text-neutral-500 dark:text-white/80\"\n [class.text-white]=\"isDayActive(item)\"\n >\n {{ item.date | date: 'MMM' }}\n </span>\n <span\n class=\"mt-2 rounded-full bg-neutral-200 dark:bg-black/25 px-1.5 py-px text-[9px] font-semibold\"\n [class.text-red-500]=\"isDayActive(item)\"\n [class.dark:text-white]=\"isDayActive(item)\"\n >\n {{ item.count | number: '1.0-2' }}\n </span>\n </button>\n }\n </div>\n <button\n type=\"button\"\n (click)=\"scrollCarousel(1)\"\n class=\"absolute right-0 top-1/2 -translate-y-1/2 z-10 flex items-center justify-center w-8 h-8 rounded-full bg-white dark:bg-neutral-800 border border-neutral-200 dark:border-white/10 shadow-sm hover:bg-neutral-100 dark:hover:bg-neutral-700 transition cursor-pointer\"\n aria-label=\"Siguiente\"\n >\n <i class=\"ri-arrow-right-s-line text-lg\"></i>\n </button>\n </div>\n} @else {\n <div class=\"mt-3 grid grid-cols-4 gap-2 sm:grid-cols-10\">\n @for (item of days(); track $index) {\n <button\n (click)=\"onToggle(item)\"\n class=\"flex flex-col items-center cursor-pointer rounded-xl border border-neutral-200 dark:border-white/10 bg-neutral-50 dark:bg-white/[0.03] px-2 py-3 transition hover:border-neutral-300 dark:hover:border-white/25 hover:bg-neutral-200 dark:hover:bg-white/[0.06] text-neutral-800 dark:text-white\"\n [class.glow-red]=\"isDayActive(item)\"\n [class.border-red-500]=\"isDayActive(item)\"\n [class.bg-red-500]=\"isDayActive(item)\"\n [class.text-white]=\"isDayActive(item)\"\n [class.hover:bg-red-600]=\"isDayActive(item)\"\n [class.dark:hover:text-white]=\"isDayActive(item)\"\n >\n <span\n class=\"text-[10px] font-semibold tracking-widest text-neutral-500 dark:text-white/80\"\n [class.text-white]=\"isDayActive(item)\"\n >\n {{ item.date | date: 'EEE' | uppercase }}\n </span>\n <span class=\"my-0.5 text-2xl font-extrabold leading-none\">\n {{ item.date | date: 'dd' }}\n </span>\n <span\n class=\"text-[10px] font-medium tracking-widest text-neutral-500 dark:text-white/80\"\n [class.text-white]=\"isDayActive(item)\"\n >\n {{ item.date | date: 'MMM' }}\n </span>\n <span\n class=\"mt-2 rounded-full bg-neutral-200 dark:bg-black/25 px-1.5 py-px text-[9px] font-semibold\"\n [class.text-red-500]=\"isDayActive(item)\"\n [class.dark:text-white]=\"isDayActive(item)\"\n >\n {{ item.count | number: '1.0-2' }}\n </span>\n </button>\n }\n </div>\n}\n" }]
|
|
4657
|
-
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
4658
|
-
type: Inject,
|
|
4659
|
-
args: [PLATFORM_ID]
|
|
4660
|
-
}] }, { type: PerformanceService }, { type: PerformancesListEventsService }, { type: ToastService }], propDecorators: { displayMode: [{
|
|
4661
|
-
type: Input
|
|
4662
|
-
}], carouselTrack: [{
|
|
4663
|
-
type: ViewChild,
|
|
4664
|
-
args: ['carouselTrack']
|
|
4665
|
-
}] } });
|
|
4666
|
-
|
|
4667
|
-
class PerformanceCardComponent {
|
|
4668
|
-
listEventService;
|
|
4669
|
-
card;
|
|
4670
|
-
constructor(listEventService) {
|
|
4671
|
-
this.listEventService = listEventService;
|
|
4672
|
-
}
|
|
4673
|
-
onSelect() {
|
|
4674
|
-
this.listEventService.setSelectedPerformance(this.card);
|
|
4675
|
-
}
|
|
4676
|
-
isSelected() {
|
|
4677
|
-
return this.listEventService.selectedPerformance()?.id === this.card.id;
|
|
4678
|
-
}
|
|
4679
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: PerformanceCardComponent, deps: [{ token: PerformancesListEventsService }], target: i0.ɵɵFactoryTarget.Component });
|
|
4680
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: PerformanceCardComponent, isStandalone: true, selector: "performance-card", inputs: { card: "card" }, ngImport: i0, template: "<div\n class=\"flex flex-col sm:flex-row items-center justify-between gap-4 rounded-2xl border px-5 py-4 transition\"\n [class.border-neutral-200]=\"!isSelected()\"\n [class.dark:border-neutral-700]=\"!isSelected()\"\n [class.bg-neutral-50]=\"!isSelected()\"\n [class.dark:bg-neutral-900]=\"!isSelected()\"\n [class.hover:border-neutral-300]=\"!isSelected()\"\n [class.dark:hover:border-neutral-600]=\"!isSelected()\"\n [class.border-brand]=\"isSelected()\"\n [class.bg-red-500/[0.08]]=\"isSelected()\"\n [class.glow-red]=\"isSelected()\"\n>\n <div class=\"flex rounded-sm overflow-hidden w-full h-auto min-h-20 sm:h-20 sm:w-20\">\n @if (card.show.images && card.show.images.length > 0) {\n <img\n [src]=\"card.show.images[0].full_url\"\n class=\"object-contain object-center max-h-full max-w-full mx-auto\"\n />\n } @else {\n <span class=\"flex bg-gray-200 h-20 w-full animate-pulse\"></span>\n }\n </div>\n\n <div class=\"flex flex-col flex-1 w-full\">\n <div\n class=\"text-2xl font-extrabold leading-none\"\n [class.text-neutral-800]=\"!isSelected()\"\n [class.dark:text-neutral-200]=\"!isSelected()\"\n [class.text-neutral-900]=\"isSelected()\"\n [class.dark:text-neutral-100]=\"isSelected()\"\n >\n {{ card.show.title }}\n </div>\n\n <div class=\"leading-none\">\n <span class=\"text-sm text-neutral-500 dark:text-neutral-400\">\n {{ card.start_time | date: `EEEE` | titlecase }}\n {{ card.start_time | date: `dd 'de' MMMM,` }}\n </span>\n\n <span class=\"font-extrabold text-lg text-neutral-800 dark:text-neutral-200\">\n {{ card.start_time | date: `hh:mm` }}\n </span>\n\n <span\n class=\"font-extrabold text-sm\"\n [class.text-neutral-800]=\"!isSelected()\"\n [class.dark:text-white]=\"!isSelected()\"\n [class.text-red-500]=\"isSelected()\"\n >\n {{ card.start_time | date: 'a' }}\n </span>\n </div>\n\n <div class=\"text-sm text-neutral-500 dark:text-neutral-400 leading-none\">\n Desde\n <span class=\"text-neutral-600 dark:text-neutral-300 font-semibold\">\n ${{ card.zone_price_cheapest | number: '1.0-2' }}\n </span>\n </div>\n </div>\n\n <div class=\"flex flex-col gap-2 w-full sm:w-[200px]\">\n <app-link-button\n [route]=\"`/admin/performances/${card.id}/reservation`\"\n text=\"Comprar entradas\"\n icon=\"ri-coupon-line\"\n variant=\"primary\"\n size=\"xs\"\n />\n </div>\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: AppLinkButtonComponent, selector: "app-link-button", inputs: ["disabled", "loading", "target", "text", "icon", "loadingText", "route", "queryParams", "size", "variant"] }, { kind: "pipe", type: i2$1.DecimalPipe, name: "number" }, { kind: "pipe", type: i2$1.TitleCasePipe, name: "titlecase" }, { kind: "pipe", type: i2$1.DatePipe, name: "date" }] });
|
|
4681
|
-
}
|
|
4682
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: PerformanceCardComponent, decorators: [{
|
|
4683
|
-
type: Component,
|
|
4684
|
-
args: [{ selector: 'performance-card', standalone: true, imports: [CommonModule, AppLinkButtonComponent], template: "<div\n class=\"flex flex-col sm:flex-row items-center justify-between gap-4 rounded-2xl border px-5 py-4 transition\"\n [class.border-neutral-200]=\"!isSelected()\"\n [class.dark:border-neutral-700]=\"!isSelected()\"\n [class.bg-neutral-50]=\"!isSelected()\"\n [class.dark:bg-neutral-900]=\"!isSelected()\"\n [class.hover:border-neutral-300]=\"!isSelected()\"\n [class.dark:hover:border-neutral-600]=\"!isSelected()\"\n [class.border-brand]=\"isSelected()\"\n [class.bg-red-500/[0.08]]=\"isSelected()\"\n [class.glow-red]=\"isSelected()\"\n>\n <div class=\"flex rounded-sm overflow-hidden w-full h-auto min-h-20 sm:h-20 sm:w-20\">\n @if (card.show.images && card.show.images.length > 0) {\n <img\n [src]=\"card.show.images[0].full_url\"\n class=\"object-contain object-center max-h-full max-w-full mx-auto\"\n />\n } @else {\n <span class=\"flex bg-gray-200 h-20 w-full animate-pulse\"></span>\n }\n </div>\n\n <div class=\"flex flex-col flex-1 w-full\">\n <div\n class=\"text-2xl font-extrabold leading-none\"\n [class.text-neutral-800]=\"!isSelected()\"\n [class.dark:text-neutral-200]=\"!isSelected()\"\n [class.text-neutral-900]=\"isSelected()\"\n [class.dark:text-neutral-100]=\"isSelected()\"\n >\n {{ card.show.title }}\n </div>\n\n <div class=\"leading-none\">\n <span class=\"text-sm text-neutral-500 dark:text-neutral-400\">\n {{ card.start_time | date: `EEEE` | titlecase }}\n {{ card.start_time | date: `dd 'de' MMMM,` }}\n </span>\n\n <span class=\"font-extrabold text-lg text-neutral-800 dark:text-neutral-200\">\n {{ card.start_time | date: `hh:mm` }}\n </span>\n\n <span\n class=\"font-extrabold text-sm\"\n [class.text-neutral-800]=\"!isSelected()\"\n [class.dark:text-white]=\"!isSelected()\"\n [class.text-red-500]=\"isSelected()\"\n >\n {{ card.start_time | date: 'a' }}\n </span>\n </div>\n\n <div class=\"text-sm text-neutral-500 dark:text-neutral-400 leading-none\">\n Desde\n <span class=\"text-neutral-600 dark:text-neutral-300 font-semibold\">\n ${{ card.zone_price_cheapest | number: '1.0-2' }}\n </span>\n </div>\n </div>\n\n <div class=\"flex flex-col gap-2 w-full sm:w-[200px]\">\n <app-link-button\n [route]=\"`/admin/performances/${card.id}/reservation`\"\n text=\"Comprar entradas\"\n icon=\"ri-coupon-line\"\n variant=\"primary\"\n size=\"xs\"\n />\n </div>\n</div>\n" }]
|
|
4685
|
-
}], ctorParameters: () => [{ type: PerformancesListEventsService }], propDecorators: { card: [{
|
|
4686
|
-
type: Input,
|
|
4687
|
-
args: [{ required: true }]
|
|
4688
|
-
}] } });
|
|
4689
|
-
|
|
4690
|
-
class PerformanceCardListComponent {
|
|
4691
|
-
platformId;
|
|
4692
|
-
performanceService;
|
|
4693
|
-
listEventService;
|
|
4694
|
-
toastService;
|
|
4695
|
-
loadingData = signal(true, ...(ngDevMode ? [{ debugName: "loadingData" }] : []));
|
|
4696
|
-
performances = signal([], ...(ngDevMode ? [{ debugName: "performances" }] : []));
|
|
4697
|
-
constructor(platformId, performanceService, listEventService, toastService) {
|
|
4698
|
-
this.platformId = platformId;
|
|
4699
|
-
this.performanceService = performanceService;
|
|
4700
|
-
this.listEventService = listEventService;
|
|
4701
|
-
this.toastService = toastService;
|
|
4702
|
-
effect(() => {
|
|
4703
|
-
const date = this.listEventService.selectedDayDate();
|
|
4704
|
-
if (date) {
|
|
4705
|
-
this.loadData();
|
|
4706
|
-
}
|
|
4707
|
-
});
|
|
4708
|
-
effect(() => {
|
|
4709
|
-
this.listEventService.filteredShowId();
|
|
4710
|
-
this.performances.set([]);
|
|
4711
|
-
const date = this.listEventService.selectedDayDate();
|
|
4712
|
-
if (date) {
|
|
4713
|
-
this.loadData();
|
|
4714
|
-
}
|
|
4715
|
-
});
|
|
4716
|
-
}
|
|
4717
|
-
ngOnInit() {
|
|
4718
|
-
if (isPlatformBrowser(this.platformId)) {
|
|
4719
|
-
this.loadData();
|
|
4720
|
-
}
|
|
4721
|
-
}
|
|
4722
|
-
loadData() {
|
|
4723
|
-
this.loadingData.set(true);
|
|
4724
|
-
const date = this.listEventService.selectedDayDate();
|
|
4725
|
-
const showId = this.listEventService.filteredShowId() ?? undefined;
|
|
4726
|
-
if (!date) {
|
|
4727
|
-
this.loadingData.set(false);
|
|
4728
|
-
return;
|
|
4729
|
-
}
|
|
4730
|
-
this.performanceService.fetchDailyPerformances({ date, show_id: showId }).subscribe({
|
|
4731
|
-
next: (response) => {
|
|
4732
|
-
this.performances.set(response?.data?.performances ?? []);
|
|
4733
|
-
this.loadingData.set(false);
|
|
4734
|
-
},
|
|
4735
|
-
error: () => {
|
|
4736
|
-
this.toastService.show('Error al cargar los datos de la función.', 'error');
|
|
4737
|
-
this.loadingData.set(false);
|
|
4738
|
-
},
|
|
4739
|
-
});
|
|
4740
|
-
}
|
|
4741
|
-
get selectedDayDate() {
|
|
4742
|
-
return this.listEventService.selectedDay()?.date ?? null;
|
|
4743
|
-
}
|
|
4744
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: PerformanceCardListComponent, deps: [{ token: PLATFORM_ID }, { token: PerformanceService }, { token: PerformancesListEventsService }, { token: ToastService }], target: i0.ɵɵFactoryTarget.Component });
|
|
4745
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: PerformanceCardListComponent, isStandalone: true, selector: "performance-card-list", ngImport: i0, template: "@if (selectedDayDate) {\n <p class=\"text-[11px] font-bold tracking-[0.25em] text-neutral-500 uppercase\">\n <span>Funciones disponibles:</span>\n <span class=\"text-neutral-500 dark:text-neutral-400\">\n el {{ selectedDayDate | date: \"EEEE d 'de' MMMM\" }}\n </span>\n </p>\n}\n\n<div class=\"mt-4 flex flex-col gap-2 w-full\">\n @if (loadingData()) {\n @for (i of [1, 2]; track $index) {\n <div\n class=\"h-40 border border-neutral-200 dark:border-white/10 bg-neutral-100 dark:bg-white/[0.03] rounded-xl animate-pulse w-full\"\n ></div>\n }\n }\n\n @for (card of performances(); track $index) {\n <performance-card [card]=\"card\" />\n }\n</div>\n", dependencies: [{ kind: "component", type: PerformanceCardComponent, selector: "performance-card", inputs: ["card"] }, { kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i2$1.DatePipe, name: "date" }] });
|
|
4746
|
-
}
|
|
4747
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: PerformanceCardListComponent, decorators: [{
|
|
4748
|
-
type: Component,
|
|
4749
|
-
args: [{ selector: 'performance-card-list', standalone: true, imports: [PerformanceCardComponent, CommonModule], template: "@if (selectedDayDate) {\n <p class=\"text-[11px] font-bold tracking-[0.25em] text-neutral-500 uppercase\">\n <span>Funciones disponibles:</span>\n <span class=\"text-neutral-500 dark:text-neutral-400\">\n el {{ selectedDayDate | date: \"EEEE d 'de' MMMM\" }}\n </span>\n </p>\n}\n\n<div class=\"mt-4 flex flex-col gap-2 w-full\">\n @if (loadingData()) {\n @for (i of [1, 2]; track $index) {\n <div\n class=\"h-40 border border-neutral-200 dark:border-white/10 bg-neutral-100 dark:bg-white/[0.03] rounded-xl animate-pulse w-full\"\n ></div>\n }\n }\n\n @for (card of performances(); track $index) {\n <performance-card [card]=\"card\" />\n }\n</div>\n" }]
|
|
4750
|
-
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
4751
|
-
type: Inject,
|
|
4752
|
-
args: [PLATFORM_ID]
|
|
4753
|
-
}] }, { type: PerformanceService }, { type: PerformancesListEventsService }, { type: ToastService }] });
|
|
4754
|
-
|
|
4755
|
-
class PerformanceStepperComponent {
|
|
4756
|
-
stepLabel;
|
|
4757
|
-
title;
|
|
4758
|
-
highlight;
|
|
4759
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: PerformanceStepperComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4760
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.25", type: PerformanceStepperComponent, isStandalone: true, selector: "performance-stepper", inputs: { stepLabel: "stepLabel", title: "title", highlight: "highlight" }, ngImport: i0, template: "<div class=\"flex items-center gap-2 text-[11px] font-semibold tracking-[0.25em] text-red-500\">\n <span class=\"h-px w-6 bg-red-500\"></span>\n {{ stepLabel }}\n</div>\n\n<h1 class=\"mt-3 text-5xl font-black leading-none tracking-tight sm:text-6xl\">\n <span class=\"text-neutral-800 dark:text-white\">{{ title }} </span\n ><span class=\"text-red-500\">{{ highlight }}</span>\n</h1>\n" });
|
|
4761
|
-
}
|
|
4762
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: PerformanceStepperComponent, decorators: [{
|
|
4763
|
-
type: Component,
|
|
4764
|
-
args: [{ selector: 'performance-stepper', standalone: true, template: "<div class=\"flex items-center gap-2 text-[11px] font-semibold tracking-[0.25em] text-red-500\">\n <span class=\"h-px w-6 bg-red-500\"></span>\n {{ stepLabel }}\n</div>\n\n<h1 class=\"mt-3 text-5xl font-black leading-none tracking-tight sm:text-6xl\">\n <span class=\"text-neutral-800 dark:text-white\">{{ title }} </span\n ><span class=\"text-red-500\">{{ highlight }}</span>\n</h1>\n" }]
|
|
4765
|
-
}], propDecorators: { stepLabel: [{
|
|
4766
|
-
type: Input,
|
|
4767
|
-
args: [{ required: true }]
|
|
4768
|
-
}], title: [{
|
|
4769
|
-
type: Input,
|
|
4770
|
-
args: [{ required: true }]
|
|
4771
|
-
}], highlight: [{
|
|
4772
|
-
type: Input,
|
|
4773
|
-
args: [{ required: true }]
|
|
4774
|
-
}] } });
|
|
4775
|
-
|
|
4776
|
-
class ShowsFilterComponent {
|
|
4777
|
-
platformId;
|
|
4778
|
-
showService;
|
|
4779
|
-
listEventService;
|
|
4780
|
-
toastService;
|
|
4781
|
-
router;
|
|
4782
|
-
loadingData = signal(true, ...(ngDevMode ? [{ debugName: "loadingData" }] : []));
|
|
4783
|
-
shows = signal([], ...(ngDevMode ? [{ debugName: "shows" }] : []));
|
|
4784
|
-
constructor(platformId, showService, listEventService, toastService, router) {
|
|
4785
|
-
this.platformId = platformId;
|
|
4786
|
-
this.showService = showService;
|
|
4787
|
-
this.listEventService = listEventService;
|
|
4788
|
-
this.toastService = toastService;
|
|
4789
|
-
this.router = router;
|
|
4790
|
-
}
|
|
4791
|
-
ngOnInit() {
|
|
4792
|
-
if (isPlatformBrowser(this.platformId)) {
|
|
4793
|
-
this.loadData();
|
|
4794
|
-
}
|
|
4795
|
-
}
|
|
4796
|
-
loadData() {
|
|
4797
|
-
this.loadingData.set(true);
|
|
4798
|
-
this.showService.fetchAvailableShows({}).subscribe({
|
|
4799
|
-
next: (response) => {
|
|
4800
|
-
this.shows.set(response?.data?.shows ?? []);
|
|
4801
|
-
this.loadingData.set(false);
|
|
4802
|
-
},
|
|
4803
|
-
error: () => {
|
|
4804
|
-
this.toastService.show('Error al cargar shows del filtro.', 'error');
|
|
4805
|
-
this.loadingData.set(false);
|
|
4806
|
-
},
|
|
4807
|
-
});
|
|
4808
|
-
}
|
|
4809
|
-
isActive(showId) {
|
|
4810
|
-
return this.listEventService.filteredShowId() === showId;
|
|
4811
|
-
}
|
|
4812
|
-
onFilter(show) {
|
|
4813
|
-
const isCurrentlyActive = this.isActive(show.id);
|
|
4814
|
-
if (isCurrentlyActive) {
|
|
4815
|
-
this.listEventService.setFilteredShowId(null);
|
|
4816
|
-
this.router.navigate([], {
|
|
4817
|
-
queryParams: { show_id: null },
|
|
4818
|
-
queryParamsHandling: 'merge',
|
|
4819
|
-
});
|
|
4820
|
-
}
|
|
4821
|
-
else {
|
|
4822
|
-
this.listEventService.setFilteredShowId(show.id);
|
|
4823
|
-
this.router.navigate([], {
|
|
4824
|
-
queryParams: { show_id: show.id },
|
|
4825
|
-
queryParamsHandling: 'merge',
|
|
4826
|
-
});
|
|
4827
|
-
}
|
|
4828
|
-
this.listEventService.setSelectedDay(null);
|
|
4829
|
-
this.listEventService.setSelectedPerformance(null);
|
|
4830
|
-
}
|
|
4831
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ShowsFilterComponent, deps: [{ token: PLATFORM_ID }, { token: ShowService }, { token: PerformancesListEventsService }, { token: ToastService }, { token: i3.Router }], target: i0.ɵɵFactoryTarget.Component });
|
|
4832
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: ShowsFilterComponent, isStandalone: true, selector: "shows-filter", ngImport: i0, template: "<div class=\"flex flex-col gap-2 w-full\">\n @if (shows().length > 0) {\n <p class=\"text-[11px] font-semibold tracking-[0.25em] text-neutral-500 uppercase\">\n Filtrar por evento\n </p>\n }\n\n @if (loadingData()) {\n @for (i of [1, 2, 3]; track $index) {\n <div\n class=\"h-15 border border-neutral-200 dark:border-gray-500/10 bg-neutral-100 dark:bg-gray-500/[0.03] rounded-xl animate-pulse w-full\"\n ></div>\n }\n }\n\n @for (show of shows(); track $index) {\n <div\n class=\"flex items-center justify-between border-gray-500/10 bg-gray-500/[0.02] rounded-xl border px-3 py-3 w-full\"\n [class.glow-red]=\"isActive(show.id)\"\n >\n <div class=\"flex items-center gap-3\">\n <span class=\"h-10 w-10 rounded-sm overflow-hidden\">\n @if (show.images.length > 0) {\n <img\n [src]=\"show.images[0].full_url\"\n class=\"object-contain object-center max-h-full max-w-full mx-auto\"\n />\n } @else {\n <span class=\"flex bg-gray-200 h-full w-full animate-pulse\"></span>\n }\n </span>\n\n <div>\n <div class=\"text-sm font-semibold text-gray-500\">{{ show.title }}</div>\n @if (show.performances_quantity && show.performances_quantity > 0) {\n <div class=\"text-[11px] text-neutral-500\">\n {{ show.performances_quantity }} funciones\n </div>\n }\n </div>\n </div>\n\n <div class=\"text-sm font-bold text-gray-500\">\n @if (isActive(show.id)) {\n <app-button\n variant=\"terciary\"\n icon=\"ri-close-line\"\n size=\"xs\"\n (clicked)=\"onFilter(show)\"\n />\n } @else {\n <app-button variant=\"primary\" text=\"Filtrar\" size=\"xs\" (clicked)=\"onFilter(show)\" />\n }\n </div>\n </div>\n }\n</div>\n", dependencies: [{ kind: "component", type: AppButtonComponent, selector: "app-button", inputs: ["disabled", "loading", "type", "variant", "text", "size", "loadingText", "icon"], outputs: ["clicked"] }, { kind: "ngmodule", type: CommonModule }] });
|
|
4833
|
-
}
|
|
4834
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ShowsFilterComponent, decorators: [{
|
|
4835
|
-
type: Component,
|
|
4836
|
-
args: [{ selector: 'shows-filter', standalone: true, imports: [AppButtonComponent, CommonModule], template: "<div class=\"flex flex-col gap-2 w-full\">\n @if (shows().length > 0) {\n <p class=\"text-[11px] font-semibold tracking-[0.25em] text-neutral-500 uppercase\">\n Filtrar por evento\n </p>\n }\n\n @if (loadingData()) {\n @for (i of [1, 2, 3]; track $index) {\n <div\n class=\"h-15 border border-neutral-200 dark:border-gray-500/10 bg-neutral-100 dark:bg-gray-500/[0.03] rounded-xl animate-pulse w-full\"\n ></div>\n }\n }\n\n @for (show of shows(); track $index) {\n <div\n class=\"flex items-center justify-between border-gray-500/10 bg-gray-500/[0.02] rounded-xl border px-3 py-3 w-full\"\n [class.glow-red]=\"isActive(show.id)\"\n >\n <div class=\"flex items-center gap-3\">\n <span class=\"h-10 w-10 rounded-sm overflow-hidden\">\n @if (show.images.length > 0) {\n <img\n [src]=\"show.images[0].full_url\"\n class=\"object-contain object-center max-h-full max-w-full mx-auto\"\n />\n } @else {\n <span class=\"flex bg-gray-200 h-full w-full animate-pulse\"></span>\n }\n </span>\n\n <div>\n <div class=\"text-sm font-semibold text-gray-500\">{{ show.title }}</div>\n @if (show.performances_quantity && show.performances_quantity > 0) {\n <div class=\"text-[11px] text-neutral-500\">\n {{ show.performances_quantity }} funciones\n </div>\n }\n </div>\n </div>\n\n <div class=\"text-sm font-bold text-gray-500\">\n @if (isActive(show.id)) {\n <app-button\n variant=\"terciary\"\n icon=\"ri-close-line\"\n size=\"xs\"\n (clicked)=\"onFilter(show)\"\n />\n } @else {\n <app-button variant=\"primary\" text=\"Filtrar\" size=\"xs\" (clicked)=\"onFilter(show)\" />\n }\n </div>\n </div>\n }\n</div>\n" }]
|
|
4837
|
-
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
4838
|
-
type: Inject,
|
|
4839
|
-
args: [PLATFORM_ID]
|
|
4840
|
-
}] }, { type: ShowService }, { type: PerformancesListEventsService }, { type: ToastService }, { type: i3.Router }] });
|
|
4841
|
-
|
|
4842
|
-
class ZonePriceItemComponent {
|
|
4843
|
-
zone;
|
|
4844
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ZonePriceItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4845
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.25", type: ZonePriceItemComponent, isStandalone: true, selector: "zone-price-item", inputs: { zone: "zone" }, ngImport: i0, template: "<div\n class=\"flex items-center justify-between rounded-xl border border-white/10 bg-white/[0.02] px-4 py-3\"\n>\n <div class=\"flex items-center gap-3\">\n <span class=\"h-3 w-3 rounded-sm {{ zone.colorClass }}\"></span>\n <div>\n <div class=\"text-sm font-semibold text-white\">{{ zone.name }}</div>\n <div class=\"text-[11px] text-neutral-500\">{{ zone.seatsAvailable }} sillas disponibles</div>\n </div>\n </div>\n <div class=\"text-sm font-bold text-white\">{{ zone.price }}</div>\n</div>\n" });
|
|
4846
|
-
}
|
|
4847
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ZonePriceItemComponent, decorators: [{
|
|
4848
|
-
type: Component,
|
|
4849
|
-
args: [{ selector: 'zone-price-item', standalone: true, template: "<div\n class=\"flex items-center justify-between rounded-xl border border-white/10 bg-white/[0.02] px-4 py-3\"\n>\n <div class=\"flex items-center gap-3\">\n <span class=\"h-3 w-3 rounded-sm {{ zone.colorClass }}\"></span>\n <div>\n <div class=\"text-sm font-semibold text-white\">{{ zone.name }}</div>\n <div class=\"text-[11px] text-neutral-500\">{{ zone.seatsAvailable }} sillas disponibles</div>\n </div>\n </div>\n <div class=\"text-sm font-bold text-white\">{{ zone.price }}</div>\n</div>\n" }]
|
|
4850
|
-
}], propDecorators: { zone: [{
|
|
4851
|
-
type: Input,
|
|
4852
|
-
args: [{ required: true }]
|
|
4853
|
-
}] } });
|
|
4854
|
-
|
|
4855
|
-
class ZonePriceListComponent {
|
|
4856
|
-
zones;
|
|
4857
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ZonePriceListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4858
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: ZonePriceListComponent, isStandalone: true, selector: "zone-price-list", inputs: { zones: "zones" }, ngImport: i0, template: "<p class=\"text-[11px] font-semibold tracking-[0.25em] text-neutral-400\">ZONAS Y PRECIOS</p>\n\n<div class=\"mt-4 flex flex-col gap-2 w-full\">\n @for (zone of zones; track $index) {\n <zone-price-item [zone]=\"zone\" />\n }\n</div>\n", dependencies: [{ kind: "component", type: ZonePriceItemComponent, selector: "zone-price-item", inputs: ["zone"] }] });
|
|
4859
|
-
}
|
|
4860
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ZonePriceListComponent, decorators: [{
|
|
4861
|
-
type: Component,
|
|
4862
|
-
args: [{ selector: 'zone-price-list', standalone: true, imports: [ZonePriceItemComponent], template: "<p class=\"text-[11px] font-semibold tracking-[0.25em] text-neutral-400\">ZONAS Y PRECIOS</p>\n\n<div class=\"mt-4 flex flex-col gap-2 w-full\">\n @for (zone of zones; track $index) {\n <zone-price-item [zone]=\"zone\" />\n }\n</div>\n" }]
|
|
4863
|
-
}], propDecorators: { zones: [{
|
|
4864
|
-
type: Input,
|
|
4865
|
-
args: [{ required: true }]
|
|
4866
|
-
}] } });
|
|
4867
|
-
|
|
4868
4554
|
// Config
|
|
4869
4555
|
|
|
4870
4556
|
/**
|
|
4871
4557
|
* Generated bundle index. Do not edit.
|
|
4872
4558
|
*/
|
|
4873
4559
|
|
|
4874
|
-
export { ADMIN_API_ROUTES, ALERT_BASE_CLASSES, ALERT_COLOR_CLASSES, ALERT_ICONS, ALERT_SIZE_CLASSES, AdminSelectComponent, AdminService, ApiService, AppAlertComponent, AppButtonComponent, AppLinkButtonComponent, AppModalComponent, AsyncSelectComponent, AuditInformationComponent, BASE_BUTTON_CLASSES, BASE_INPUT_CLASSES, BUTTON_SIZES_CLASSES, BUTTON_VARIANT_CLASSES, CITY_API_ENDPOINTS, COUNTRY_API_ENDPOINTS, CUSTOMERS_API_ROUTES, ChangePasswordFormComponent, ChangePasswordFormService, CitiesService, CitySelectComponent, ColorPickerComponent, CorporateBondStatus, CountrySelectComponent, CountryService, CouponApplicability, CouponDiscountType, CustomerSelectComponent, CustomerService, DateInputComponent, DateService,
|
|
4560
|
+
export { ADMIN_API_ROUTES, ALERT_BASE_CLASSES, ALERT_COLOR_CLASSES, ALERT_ICONS, ALERT_SIZE_CLASSES, AdminSelectComponent, AdminService, ApiService, AppAlertComponent, AppButtonComponent, AppLinkButtonComponent, AppModalComponent, AsyncSelectComponent, AuditInformationComponent, BASE_BUTTON_CLASSES, BASE_INPUT_CLASSES, BUTTON_SIZES_CLASSES, BUTTON_VARIANT_CLASSES, CITY_API_ENDPOINTS, COUNTRY_API_ENDPOINTS, CUSTOMERS_API_ROUTES, ChangePasswordFormComponent, ChangePasswordFormService, CitiesService, CitySelectComponent, ColorPickerComponent, CorporateBondStatus, CountrySelectComponent, CountryService, CouponApplicability, CouponDiscountType, CustomerSelectComponent, CustomerService, DateInputComponent, DateService, DeleteConfirmationComponent, DeleteConfirmationService, DynamicTableComponent, ERROR_INPUT_CLASSES, EndDateGreaterThanStartValidator, FORM_ERROR_MESSAGES, FileType, FileUploadComponent, FileUploadPreviewComponent, FormEditorComponent, FormInputComponent, FormSelectComponent, FormTextareaComponent, LanguageSwitcherComponent, LoadingModalService, LoadingmModalComponent, MinTodayValidator, MustMatchValidator, OrderItemType, OrderStatus, PERFORMANCES_API_ROUTES, PRICE_ZONES_API_ROUTES, PRODUCTS_API_ROUTES, PerformanceMultiSelectComponent, PerformanceSelectComponent, PerformanceService, PerformanceStatus, PerformanceTicketStatus, PriceZoneEventService, PriceZoneFormModalService, PriceZoneSelectComponent, PriceZoneService, ProductMultiSelectComponent, ProductSelectComponent, ProductService, RoomMapElementOrientation, RoomMapElementType, SHOWS_API_ROUTES, STATE_API_ENDPOINTS, ShowMultiSelectComponent, ShowSelectComponent, ShowService, StateSelectComponent, StatesService, TICKERA_COMPONENTS_CONFIG, ToastService, ToggleSwitchComponent, VENUES_API_ROUTES, authInterceptor, formatCitiesResponseToSelect, getCustomerFullname, parseJsonToFormDataAdvanced, provideTickeraComponents, transformImageToFile };
|
|
4875
4561
|
//# sourceMappingURL=tickera-angular-components.mjs.map
|