@solcre-org/core-ui 2.12.0 → 2.12.2

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.
@@ -969,6 +969,7 @@ class ImagePreviewComponent {
969
969
  borderRadius = input('4px');
970
970
  cursor = input('pointer');
971
971
  loading = input('lazy');
972
+ isRelative = input(false);
972
973
  onImageClick() {
973
974
  this.imageModalService.openImageModal({
974
975
  src: this.src(),
@@ -977,7 +978,7 @@ class ImagePreviewComponent {
977
978
  });
978
979
  }
979
980
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: ImagePreviewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
980
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.0.6", type: ImagePreviewComponent, isStandalone: true, selector: "core-image-preview", inputs: { src: { classPropertyName: "src", publicName: "src", isSignal: true, isRequired: true, transformFunction: null }, alt: { classPropertyName: "alt", publicName: "alt", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, objectFit: { classPropertyName: "objectFit", publicName: "objectFit", isSignal: true, isRequired: false, transformFunction: null }, borderRadius: { classPropertyName: "borderRadius", publicName: "borderRadius", isSignal: true, isRequired: false, transformFunction: null }, cursor: { classPropertyName: "cursor", publicName: "cursor", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div class=\"c-img-preview\" \n (click)=\"onImageClick()\">\n <img \n [src]=\"src()\" \n [alt]=\"alt()\"\n [title]=\"title()\"\n [loading]=\"loading()\"\n [style.object-fit]=\"objectFit()\"\n [style.border-radius]=\"borderRadius()\"\n [style.cursor]=\"cursor()\">\n</div>", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }] });
981
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.0.6", type: ImagePreviewComponent, isStandalone: true, selector: "core-image-preview", inputs: { src: { classPropertyName: "src", publicName: "src", isSignal: true, isRequired: true, transformFunction: null }, alt: { classPropertyName: "alt", publicName: "alt", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, objectFit: { classPropertyName: "objectFit", publicName: "objectFit", isSignal: true, isRequired: false, transformFunction: null }, borderRadius: { classPropertyName: "borderRadius", publicName: "borderRadius", isSignal: true, isRequired: false, transformFunction: null }, cursor: { classPropertyName: "cursor", publicName: "cursor", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, isRelative: { classPropertyName: "isRelative", publicName: "isRelative", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div class=\"c-img-preview\" \n (click)=\"onImageClick()\">\n <img \n [src]=\"src()\" \n [alt]=\"alt()\"\n [title]=\"title()\"\n [loading]=\"loading()\"\n [style.object-fit]=\"objectFit()\"\n [style.border-radius]=\"borderRadius()\"\n [style.cursor]=\"cursor()\">\n</div>", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }] });
981
982
  }
982
983
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: ImagePreviewComponent, decorators: [{
983
984
  type: Component,
@@ -1469,7 +1470,7 @@ class FileFieldComponent extends BaseFieldComponent {
1469
1470
  this.onBlur();
1470
1471
  }
1471
1472
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: FileFieldComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
1472
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.6", type: FileFieldComponent, isStandalone: true, selector: "core-file-field", usesInheritance: true, hostDirectives: [{ directive: CoreHostDirective }], ngImport: i0, template: "<label class=\"c-entry-item\" [class.c-entry-item--inline]=\"field().inline\">\n @if (field().label) {\n <span class=\"c-entry-text\">\n {{ field().label | translate }}\n @if (hasRequiredValidators()) {\n <span class=\"c-required\">*</span>\n }\n </span>\n }\n <div class=\"c-entry-file\" [class.has-error]=\"hasError()\">\n @if(fieldConfig().multiple || isEditMode() || allFiles().length === 0) {\n <label class=\"c-entry-file__label\">\n <span class=\"icon-upload c-entry-file__icon\"></span>\n <input\n type=\"file\"\n class=\"c-entry-file__input\"\n (change)=\"onFileSelected($event)\"\n [accept]=\"fieldConfig().accept\"\n [multiple]=\"fieldConfig().multiple\"\n (blur)=\"onBlurInput()\"\n [readonly]=\"isReadonly()\"\n >\n {{ fieldConfig().placeholder ?? fieldConfig().label | translate }}\n @if(fieldConfig().acceptString) {\n <br>\n <span class=\"c-entry-file__filename\" id=\"file-name\">{{ fieldConfig().acceptString }}</span>\n }\n </label>\n }\n\n @if (allFiles().length > 0) {\n <div class=\"c-attachments\">\n <p class=\"c-entry-text\">{{ 'files.attachedFiles' | translate }}</p>\n \n <ul class=\"c-attachments__list\">\n @for (file of allFiles(); track $index; let i = $index) {\n <li class=\"c-attachments__item\">\n <div class=\"c-bulleted-text\">\n @if(!isServerFile(file)) {\n <time>{{ getCurrentDate() }}</time>\n <span>{{ getCurrentUser() }}</span>\n }\n </div>\n \n <div class=\"c-attachments__holder\">\n @if(!isServerFile(file) && file.type.startsWith('image/') && fieldConfig().showPreview !== false) {\n <div class=\"c-attachments__content\">\n <div class=\"c-attachments__pic\">\n @if(isPreviewFile(file) && getOriginalUrl(file)) {\n <core-image-preview\n [src]=\"getOriginalUrl(file)!\"\n [alt]=\"file.name\"\n ></core-image-preview>\n } @else if(getPreviewUrl(file)) {\n <core-image-preview\n [src]=\"getPreviewUrl(file)!\"\n [alt]=\"file.name\"\n ></core-image-preview>\n }\n </div>\n <div class=\"c-attachments__text\">\n <span class=\"c-attachments__name-file\">{{ file.name }}</span>\n <span class=\"c-attachments__file-size\">({{ formatFileSize(file.size) }})</span>\n </div>\n </div>\n } @else {\n <a class=\"c-attachments__content\">\n @if(isServerFile(file)) {\n <span class=\"icon-file\"></span>\n {{ file.filename }}\n } @else {\n <span [class]=\"getFileIcon(file)\"></span>\n <div class=\"c-attachments__text\">\n <span class=\"c-attachments__name-file\">{{ file.name }}</span>\n <span class=\"c-attachments__file-size\">({{ formatFileSize(file.size) }})</span>\n </div>\n }\n </a>\n }\n\n <div class=\"c-attachments__actions u-flex u-flex--wrap\">\n <button \n type=\"button\" \n class=\"c-link context:error\" \n (click)=\"removeFile(i)\"\n [title]=\"'files.remove' | translate\"\n >\n <span class=\"icon-delete\"></span>\n {{ 'files.remove' | translate }}\n </button>\n\n @if(fieldConfig().customActions) {\n @for(action of fieldConfig().customActions; track action.id) {\n <button \n type=\"button\"\n class=\"c-link c-link--underlined\" \n (click)=\"action.action(file)\"\n [title]=\"action.label | translate\"\n >\n {{ action.label | translate }}\n <span [ngClass]=\"action.icon | coreIconCompat\"></span>\n </button>\n }\n }\n </div>\n </div>\n </li>\n }\n </ul>\n </div>\n }\n </div>\n <core-field-errors [errors]=\"errors()\" />\n @if(displayErrorMessage()) {\n <span class=\"c-entry-error\">{{ displayErrorMessage()!.key | translate:displayErrorMessage()!.params }}</span>\n }\n</label>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "component", type: FieldErrorsComponent, selector: "core-field-errors", inputs: ["errors"] }, { kind: "pipe", type: IconCompatPipe, name: "coreIconCompat" }, { kind: "component", type: ImagePreviewComponent, selector: "core-image-preview", inputs: ["src", "alt", "title", "width", "height", "objectFit", "borderRadius", "cursor", "loading"] }] });
1473
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.6", type: FileFieldComponent, isStandalone: true, selector: "core-file-field", usesInheritance: true, hostDirectives: [{ directive: CoreHostDirective }], ngImport: i0, template: "<label class=\"c-entry-item\" [class.c-entry-item--inline]=\"field().inline\">\n @if (field().label) {\n <span class=\"c-entry-text\">\n {{ field().label | translate }}\n @if (hasRequiredValidators()) {\n <span class=\"c-required\">*</span>\n }\n </span>\n }\n <div class=\"c-entry-file\" [class.has-error]=\"hasError()\">\n @if(fieldConfig().multiple || isEditMode() || allFiles().length === 0) {\n <label class=\"c-entry-file__label\">\n <span class=\"icon-upload c-entry-file__icon\"></span>\n <input\n type=\"file\"\n class=\"c-entry-file__input\"\n (change)=\"onFileSelected($event)\"\n [accept]=\"fieldConfig().accept\"\n [multiple]=\"fieldConfig().multiple\"\n (blur)=\"onBlurInput()\"\n [readonly]=\"isReadonly()\"\n >\n {{ fieldConfig().placeholder ?? fieldConfig().label | translate }}\n @if(fieldConfig().acceptString) {\n <br>\n <span class=\"c-entry-file__filename\" id=\"file-name\">{{ fieldConfig().acceptString }}</span>\n }\n </label>\n }\n\n @if (allFiles().length > 0) {\n <div class=\"c-attachments\">\n <p class=\"c-entry-text\">{{ 'files.attachedFiles' | translate }}</p>\n \n <ul class=\"c-attachments__list\">\n @for (file of allFiles(); track $index; let i = $index) {\n <li class=\"c-attachments__item\">\n <div class=\"c-bulleted-text\">\n @if(!isServerFile(file)) {\n <time>{{ getCurrentDate() }}</time>\n <span>{{ getCurrentUser() }}</span>\n }\n </div>\n \n <div class=\"c-attachments__holder\">\n @if(!isServerFile(file) && file.type.startsWith('image/') && fieldConfig().showPreview !== false) {\n <div class=\"c-attachments__content\">\n <div class=\"c-attachments__pic\">\n @if(isPreviewFile(file) && getOriginalUrl(file)) {\n <core-image-preview\n [src]=\"getOriginalUrl(file)!\"\n [alt]=\"file.name\"\n ></core-image-preview>\n } @else if(getPreviewUrl(file)) {\n <core-image-preview\n [src]=\"getPreviewUrl(file)!\"\n [alt]=\"file.name\"\n ></core-image-preview>\n }\n </div>\n <div class=\"c-attachments__text\">\n <span class=\"c-attachments__name-file\">{{ file.name }}</span>\n <span class=\"c-attachments__file-size\">({{ formatFileSize(file.size) }})</span>\n </div>\n </div>\n } @else {\n <a class=\"c-attachments__content\">\n @if(isServerFile(file)) {\n <span class=\"icon-file\"></span>\n {{ file.filename }}\n } @else {\n <span [class]=\"getFileIcon(file)\"></span>\n <div class=\"c-attachments__text\">\n <span class=\"c-attachments__name-file\">{{ file.name }}</span>\n <span class=\"c-attachments__file-size\">({{ formatFileSize(file.size) }})</span>\n </div>\n }\n </a>\n }\n\n <div class=\"c-attachments__actions u-flex u-flex--wrap\">\n <button \n type=\"button\" \n class=\"c-link context:error\" \n (click)=\"removeFile(i)\"\n [title]=\"'files.remove' | translate\"\n >\n <span class=\"icon-delete\"></span>\n {{ 'files.remove' | translate }}\n </button>\n\n @if(fieldConfig().customActions) {\n @for(action of fieldConfig().customActions; track action.id) {\n <button \n type=\"button\"\n class=\"c-link c-link--underlined\" \n (click)=\"action.action(file)\"\n [title]=\"action.label | translate\"\n >\n {{ action.label | translate }}\n <span [ngClass]=\"action.icon | coreIconCompat\"></span>\n </button>\n }\n }\n </div>\n </div>\n </li>\n }\n </ul>\n </div>\n }\n </div>\n <core-field-errors [errors]=\"errors()\" />\n @if(displayErrorMessage()) {\n <span class=\"c-entry-error\">{{ displayErrorMessage()!.key | translate:displayErrorMessage()!.params }}</span>\n }\n</label>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "component", type: FieldErrorsComponent, selector: "core-field-errors", inputs: ["errors"] }, { kind: "pipe", type: IconCompatPipe, name: "coreIconCompat" }, { kind: "component", type: ImagePreviewComponent, selector: "core-image-preview", inputs: ["src", "alt", "title", "width", "height", "objectFit", "borderRadius", "cursor", "loading", "isRelative"] }] });
1473
1474
  }
1474
1475
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: FileFieldComponent, decorators: [{
1475
1476
  type: Component,
@@ -10830,12 +10831,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImpor
10830
10831
  // Este archivo es generado automáticamente por scripts/update-version.js
10831
10832
  // No edites manualmente este archivo
10832
10833
  const VERSION = {
10833
- full: '2.12.0',
10834
+ full: '2.12.2',
10834
10835
  major: 2,
10835
10836
  minor: 12,
10836
- patch: 0,
10837
- timestamp: '2025-09-02T20:07:18.238Z',
10838
- buildDate: '2/9/2025'
10837
+ patch: 2,
10838
+ timestamp: '2025-09-03T13:16:06.353Z',
10839
+ buildDate: '3/9/2025'
10839
10840
  };
10840
10841
 
10841
10842
  class MainNavComponent {
@@ -12278,460 +12279,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImpor
12278
12279
  }]
12279
12280
  }] });
12280
12281
 
12281
- var SliderActionType;
12282
- (function (SliderActionType) {
12283
- SliderActionType["CLICK"] = "click";
12284
- SliderActionType["CHANGE"] = "change";
12285
- SliderActionType["BEFORE_CHANGE"] = "beforeChange";
12286
- SliderActionType["AFTER_CHANGE"] = "afterChange";
12287
- SliderActionType["EDGE"] = "edge";
12288
- SliderActionType["SWIPE"] = "swipe";
12289
- })(SliderActionType || (SliderActionType = {}));
12290
-
12291
- class SliderService {
12292
- currentIndex = signal(0);
12293
- items = signal([]);
12294
- config = signal({});
12295
- getCurrentIndex = computed(() => this.currentIndex());
12296
- getItems = computed(() => this.items());
12297
- getConfig = computed(() => this.config());
12298
- getTotalItems = computed(() => this.items().length);
12299
- getNavigation = computed(() => {
12300
- const current = this.currentIndex();
12301
- const total = this.items().length;
12302
- const infinite = this.config().infinite ?? false;
12303
- return {
12304
- currentIndex: current,
12305
- totalItems: total,
12306
- canGoPrev: infinite || current > 0,
12307
- canGoNext: infinite || current < total - 1
12308
- };
12309
- });
12310
- getCurrentItem = computed(() => {
12311
- const items = this.items();
12312
- const index = this.currentIndex();
12313
- return items[index] || null;
12314
- });
12315
- setItems(items) {
12316
- this.items.set(items);
12317
- if (this.currentIndex() >= items.length) {
12318
- this.currentIndex.set(Math.max(0, items.length - 1));
12319
- }
12320
- }
12321
- setConfig(config) {
12322
- this.config.set(config);
12323
- }
12324
- goToSlide(index) {
12325
- const items = this.items();
12326
- if (index >= 0 && index < items.length) {
12327
- this.currentIndex.set(index);
12328
- }
12329
- }
12330
- nextSlide() {
12331
- const current = this.currentIndex();
12332
- const total = this.items().length;
12333
- const infinite = this.config().infinite ?? false;
12334
- if (infinite) {
12335
- this.currentIndex.set((current + 1) % total);
12336
- }
12337
- else if (current < total - 1) {
12338
- this.currentIndex.set(current + 1);
12339
- }
12340
- }
12341
- prevSlide() {
12342
- const current = this.currentIndex();
12343
- const total = this.items().length;
12344
- const infinite = this.config().infinite ?? false;
12345
- if (infinite) {
12346
- this.currentIndex.set(current === 0 ? total - 1 : current - 1);
12347
- }
12348
- else if (current > 0) {
12349
- this.currentIndex.set(current - 1);
12350
- }
12351
- }
12352
- reset() {
12353
- this.currentIndex.set(0);
12354
- }
12355
- getSlidesByConfig() {
12356
- const items = this.items();
12357
- const slidesToShow = this.config().slidesToShow ?? 1;
12358
- const currentIndex = this.currentIndex();
12359
- if (slidesToShow === 1) {
12360
- return [items[currentIndex]].filter(Boolean);
12361
- }
12362
- const result = [];
12363
- for (let i = 0; i < slidesToShow; i++) {
12364
- const index = (currentIndex + i) % items.length;
12365
- if (items[index]) {
12366
- result.push(items[index]);
12367
- }
12368
- }
12369
- return result;
12370
- }
12371
- getThumbnails() {
12372
- return this.items().map(item => ({
12373
- ...item,
12374
- imageUrl: item.thumbnailUrl || item.imageUrl
12375
- }));
12376
- }
12377
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: SliderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
12378
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: SliderService, providedIn: 'root' });
12379
- }
12380
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: SliderService, decorators: [{
12381
- type: Injectable,
12382
- args: [{
12383
- providedIn: 'root'
12384
- }]
12385
- }] });
12386
-
12387
- class GenericSliderComponent {
12388
- sliderService = inject(SliderService);
12389
- autoPlayInterval = null;
12390
- items = input([]);
12391
- config = input({
12392
- autoPlay: false,
12393
- autoPlayInterval: 3000,
12394
- showDots: true,
12395
- showArrows: true,
12396
- showThumbnails: false,
12397
- infinite: true,
12398
- slidesToShow: 1,
12399
- slidesToScroll: 1,
12400
- centerMode: false,
12401
- height: '400px',
12402
- thumbnailHeight: '80px',
12403
- showPreview: true,
12404
- enableKeyboard: true,
12405
- swipeToSlide: true,
12406
- pauseOnHover: true,
12407
- showCounter: false,
12408
- lazyLoad: true,
12409
- fadeEffect: false,
12410
- verticalThumbnails: false
12411
- });
12412
- actionTriggered = output();
12413
- slideChanged = output();
12414
- isHovered = signal(false);
12415
- isDragging = signal(false);
12416
- startX = signal(0);
12417
- currentX = signal(0);
12418
- currentIndex = computed(() => this.sliderService.getCurrentIndex());
12419
- totalItems = computed(() => this.sliderService.getTotalItems());
12420
- currentItem = computed(() => this.sliderService.getCurrentItem());
12421
- navigation = computed(() => this.sliderService.getNavigation());
12422
- visibleSlides = computed(() => this.sliderService.getSlidesByConfig());
12423
- thumbnails = computed(() => this.sliderService.getThumbnails());
12424
- mergedConfig = computed(() => ({
12425
- ...this.config(),
12426
- ...this.sliderService.getConfig()
12427
- }));
12428
- canAutoPlay = computed(() => {
12429
- const config = this.mergedConfig();
12430
- return config.autoPlay && !this.isHovered() && !this.isDragging();
12431
- });
12432
- showDots = computed(() => this.mergedConfig().showDots && this.totalItems() > 1);
12433
- showArrows = computed(() => this.mergedConfig().showArrows && this.totalItems() > 1);
12434
- showThumbnails = computed(() => this.mergedConfig().showThumbnails && this.totalItems() > 1);
12435
- showCounter = computed(() => this.mergedConfig().showCounter && this.totalItems() > 1);
12436
- containerStyles = computed(() => ({
12437
- height: this.mergedConfig().height || '400px',
12438
- position: 'relative',
12439
- overflow: 'hidden'
12440
- }));
12441
- slideStyles = computed(() => {
12442
- const config = this.mergedConfig();
12443
- const slidesToShow = config.slidesToShow || 1;
12444
- const currentIndex = this.currentIndex();
12445
- const totalItems = this.totalItems();
12446
- const totalWidth = (totalItems / slidesToShow) * 100;
12447
- const slideWidth = 100 / slidesToShow;
12448
- const translateX = -(currentIndex * slideWidth);
12449
- return {
12450
- transform: `translateX(${translateX}%)`,
12451
- transition: this.isDragging() ? 'none' : 'transform 0.3s ease-in-out',
12452
- display: 'flex',
12453
- width: `${totalWidth}%`
12454
- };
12455
- });
12456
- prevButtonConfig = computed(() => ({
12457
- type: ButtonType.PRIMARY,
12458
- context: ButtonContext.DEFAULT,
12459
- size: ButtonSize.SMALL,
12460
- text: '',
12461
- icon: 'icon-arrow-left',
12462
- disabled: !this.navigation().canGoPrev,
12463
- ariaLabel: 'slider.previous'
12464
- }));
12465
- nextButtonConfig = computed(() => ({
12466
- type: ButtonType.PRIMARY,
12467
- context: ButtonContext.DEFAULT,
12468
- size: ButtonSize.SMALL,
12469
- text: '',
12470
- icon: 'icon-arrow-right',
12471
- disabled: !this.navigation().canGoNext,
12472
- ariaLabel: 'slider.next'
12473
- }));
12474
- constructor() {
12475
- effect(() => {
12476
- this.sliderService.setItems(this.items());
12477
- });
12478
- effect(() => {
12479
- this.sliderService.setConfig(this.config());
12480
- });
12481
- effect(() => {
12482
- const currentIndex = this.currentIndex();
12483
- const currentItem = this.currentItem();
12484
- if (currentItem) {
12485
- this.slideChanged.emit({ currentIndex, currentItem });
12486
- }
12487
- });
12488
- effect(() => {
12489
- if (this.canAutoPlay()) {
12490
- this.startAutoPlay();
12491
- }
12492
- else {
12493
- this.stopAutoPlay();
12494
- }
12495
- });
12496
- }
12497
- ngOnInit() {
12498
- this.setupAutoPlay();
12499
- }
12500
- ngOnDestroy() {
12501
- this.stopAutoPlay();
12502
- }
12503
- onKeydown(event) {
12504
- if (!this.mergedConfig().enableKeyboard)
12505
- return;
12506
- switch (event.key) {
12507
- case 'ArrowLeft':
12508
- event.preventDefault();
12509
- this.goToPrevious();
12510
- break;
12511
- case 'ArrowRight':
12512
- event.preventDefault();
12513
- this.goToNext();
12514
- break;
12515
- case ' ':
12516
- event.preventDefault();
12517
- this.toggleAutoPlay();
12518
- break;
12519
- case 'Home':
12520
- event.preventDefault();
12521
- this.goToSlide(0);
12522
- break;
12523
- case 'End':
12524
- event.preventDefault();
12525
- this.goToSlide(this.totalItems() - 1);
12526
- break;
12527
- }
12528
- }
12529
- goToSlide(index) {
12530
- const previousIndex = this.currentIndex();
12531
- this.sliderService.goToSlide(index);
12532
- this.emitAction(SliderActionType.CHANGE, this.currentItem(), index);
12533
- if (previousIndex !== index) {
12534
- this.emitAction(SliderActionType.AFTER_CHANGE, this.currentItem(), index);
12535
- }
12536
- }
12537
- goToNext() {
12538
- const config = this.mergedConfig();
12539
- const current = this.currentIndex();
12540
- const total = this.totalItems();
12541
- const slidesToShow = config.slidesToShow || 1;
12542
- const slidesToScroll = config.slidesToScroll || 1;
12543
- let nextIndex;
12544
- if (config.infinite) {
12545
- nextIndex = (current + slidesToScroll) % total;
12546
- }
12547
- else {
12548
- const maxIndex = Math.max(0, total - slidesToShow);
12549
- nextIndex = Math.min(current + slidesToScroll, maxIndex);
12550
- }
12551
- this.goToSlide(nextIndex);
12552
- }
12553
- goToPrevious() {
12554
- const config = this.mergedConfig();
12555
- const current = this.currentIndex();
12556
- const total = this.totalItems();
12557
- const slidesToScroll = config.slidesToScroll || 1;
12558
- let prevIndex;
12559
- if (config.infinite) {
12560
- prevIndex = current - slidesToScroll < 0 ? total - slidesToScroll : current - slidesToScroll;
12561
- }
12562
- else {
12563
- prevIndex = Math.max(current - slidesToScroll, 0);
12564
- }
12565
- this.goToSlide(prevIndex);
12566
- }
12567
- setupAutoPlay() {
12568
- if (this.mergedConfig().autoPlay) {
12569
- this.startAutoPlay();
12570
- }
12571
- }
12572
- startAutoPlay() {
12573
- this.stopAutoPlay();
12574
- if (this.canAutoPlay()) {
12575
- this.autoPlayInterval = setInterval(() => {
12576
- if (this.canAutoPlay()) {
12577
- this.goToNext();
12578
- }
12579
- }, this.mergedConfig().autoPlayInterval || 3000);
12580
- }
12581
- }
12582
- stopAutoPlay() {
12583
- if (this.autoPlayInterval) {
12584
- clearInterval(this.autoPlayInterval);
12585
- this.autoPlayInterval = null;
12586
- }
12587
- }
12588
- toggleAutoPlay() {
12589
- if (this.canAutoPlay()) {
12590
- this.stopAutoPlay();
12591
- }
12592
- else {
12593
- this.startAutoPlay();
12594
- }
12595
- }
12596
- onMouseEnter() {
12597
- if (this.mergedConfig().pauseOnHover) {
12598
- this.isHovered.set(true);
12599
- }
12600
- }
12601
- onMouseLeave() {
12602
- if (this.mergedConfig().pauseOnHover) {
12603
- this.isHovered.set(false);
12604
- }
12605
- }
12606
- onTouchStart(event) {
12607
- if (!this.mergedConfig().swipeToSlide)
12608
- return;
12609
- this.isDragging.set(true);
12610
- this.startX.set(event.touches[0].clientX);
12611
- }
12612
- onTouchMove(event) {
12613
- if (!this.isDragging() || !this.mergedConfig().swipeToSlide)
12614
- return;
12615
- this.currentX.set(event.touches[0].clientX);
12616
- event.preventDefault();
12617
- }
12618
- onTouchEnd() {
12619
- if (!this.isDragging() || !this.mergedConfig().swipeToSlide)
12620
- return;
12621
- const diffX = this.startX() - this.currentX();
12622
- const threshold = 50;
12623
- if (Math.abs(diffX) > threshold) {
12624
- if (diffX > 0) {
12625
- this.goToNext();
12626
- }
12627
- else {
12628
- this.goToPrevious();
12629
- }
12630
- this.emitAction(SliderActionType.SWIPE, this.currentItem(), this.currentIndex());
12631
- }
12632
- this.isDragging.set(false);
12633
- this.startX.set(0);
12634
- this.currentX.set(0);
12635
- }
12636
- onSlideClick(item, index) {
12637
- this.emitAction(SliderActionType.CLICK, item, index);
12638
- }
12639
- onDotClick(index) {
12640
- this.goToSlide(index);
12641
- }
12642
- onThumbnailClick(index) {
12643
- this.goToSlide(index);
12644
- }
12645
- emitAction(type, item, index) {
12646
- this.actionTriggered.emit({ type, item, index });
12647
- }
12648
- getSlideImage(item) {
12649
- return item.imageUrl || '';
12650
- }
12651
- getSlideAlt(item) {
12652
- return item.alt || item.title || `Slide ${this.currentIndex() + 1}`;
12653
- }
12654
- isActiveSlide(index) {
12655
- const config = this.mergedConfig();
12656
- const current = this.currentIndex();
12657
- const slidesToShow = config.slidesToShow || 1;
12658
- if (slidesToShow === 1) {
12659
- return index === current;
12660
- }
12661
- else {
12662
- return index >= current && index < current + slidesToShow;
12663
- }
12664
- }
12665
- isActiveDot(index) {
12666
- return index === this.currentIndex();
12667
- }
12668
- isActiveThumbnail(index) {
12669
- return index === this.currentIndex();
12670
- }
12671
- getCounterText() {
12672
- return `${this.currentIndex() + 1} / ${this.totalItems()}`;
12673
- }
12674
- getSlideWidth() {
12675
- const config = this.mergedConfig();
12676
- const slidesToShow = config.slidesToShow || 1;
12677
- const totalItems = this.totalItems();
12678
- const widthPercentage = (100 / totalItems);
12679
- return `${widthPercentage}%`;
12680
- }
12681
- getFileTypeIcon(fileType) {
12682
- const typeMap = {
12683
- 'pdf': 'icon-file-pdf',
12684
- 'doc': 'icon-file-word',
12685
- 'docx': 'icon-file-word',
12686
- 'xls': 'icon-file-excel',
12687
- 'xlsx': 'icon-file-excel',
12688
- 'ppt': 'icon-file-powerpoint',
12689
- 'pptx': 'icon-file-powerpoint',
12690
- 'txt': 'icon-file-text',
12691
- 'zip': 'icon-file-zip',
12692
- 'rar': 'icon-file-zip',
12693
- 'jpg': 'icon-file-image',
12694
- 'jpeg': 'icon-file-image',
12695
- 'png': 'icon-file-image',
12696
- 'gif': 'icon-file-image',
12697
- 'mp4': 'icon-file-video',
12698
- 'avi': 'icon-file-video',
12699
- 'mov': 'icon-file-video',
12700
- 'mp3': 'icon-file-audio',
12701
- 'wav': 'icon-file-audio'
12702
- };
12703
- return typeMap[fileType.toLowerCase()] || 'icon-file';
12704
- }
12705
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: GenericSliderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
12706
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.6", type: GenericSliderComponent, isStandalone: true, selector: "core-generic-slider", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { actionTriggered: "actionTriggered", slideChanged: "slideChanged" }, host: { listeners: { "keydown": "onKeydown($event)" } }, ngImport: i0, template: "<div class=\"c-slider\" \n [style]=\"containerStyles()\"\n (mouseenter)=\"onMouseEnter()\"\n (mouseleave)=\"onMouseLeave()\"\n (touchstart)=\"onTouchStart($event)\"\n (touchmove)=\"onTouchMove($event)\"\n (touchend)=\"onTouchEnd()\">\n \n <!-- Main slider container -->\n <div class=\"c-slider__container\">\n \n <!-- Previous arrow -->\n @if (showArrows()) {\n <div class=\"c-slider__arrow c-slider__arrow--prev\">\n <core-generic-button\n [config]=\"prevButtonConfig()\"\n (buttonClick)=\"goToPrevious()\">\n </core-generic-button>\n </div>\n }\n\n <!-- Slides wrapper -->\n <div class=\"c-slider__wrapper\">\n <div class=\"c-slider__track\" [style]=\"slideStyles()\">\n @for (slide of items(); track slide.id; let i = $index) {\n <div class=\"c-slider__slide\" \n [class.c-slider__slide--active]=\"isActiveSlide(i)\"\n [style.width]=\"getSlideWidth()\"\n (click)=\"onSlideClick(slide, i)\">\n \n <!-- Image -->\n <div class=\"c-slider__image-container\">\n @if (mergedConfig().lazyLoad) {\n <img [src]=\"getSlideImage(slide)\" \n [alt]=\"getSlideAlt(slide)\"\n class=\"c-slider__image\"\n loading=\"lazy\">\n } @else {\n <img [src]=\"getSlideImage(slide)\" \n [alt]=\"getSlideAlt(slide)\"\n class=\"c-slider__image\">\n }\n \n <!-- File Preview Icon -->\n @if (mergedConfig().showFilePreview && slide.filePreview) {\n <div class=\"c-slider__file-preview\">\n <div class=\"c-slider__file-icon\">\n <span class=\"icon-file\" [ngClass]=\"getFileTypeIcon(slide.filePreview.fileType)\"></span>\n </div>\n <div class=\"c-slider__file-info\">\n <span class=\"c-slider__file-name\">{{ slide.filePreview.fileName }}</span>\n @if (slide.filePreview.fileSize) {\n <span class=\"c-slider__file-size\">{{ slide.filePreview.fileSize }}</span>\n }\n </div>\n </div>\n }\n \n <!-- Overlay content -->\n @if (slide.title || slide.description) {\n <div class=\"c-slider__overlay\">\n @if (slide.title) {\n <h3 class=\"c-slider__title\">{{ slide.title }}</h3>\n }\n @if (slide.description) {\n <p class=\"c-slider__description\">{{ slide.description }}</p>\n }\n </div>\n }\n </div>\n </div>\n }\n </div>\n </div>\n\n <!-- Next arrow -->\n @if (showArrows()) {\n <div class=\"c-slider__arrow c-slider__arrow--next\">\n <core-generic-button\n [config]=\"nextButtonConfig()\"\n (buttonClick)=\"goToNext()\">\n </core-generic-button>\n </div>\n }\n </div>\n\n <!-- Counter -->\n @if (showCounter()) {\n <div class=\"c-slider__counter\">\n <span class=\"c-slider__counter-text\">{{ getCounterText() }}</span>\n </div>\n }\n\n <!-- Dots navigation -->\n @if (showDots()) {\n <div class=\"c-slider__dots\">\n @for (item of items(); track item.id; let i = $index) {\n <button type=\"button\"\n class=\"c-slider__dot\"\n [class.c-slider__dot--active]=\"isActiveDot(i)\"\n [attr.aria-label]=\"'slider.go-to-slide' | translate: {number: i + 1}\"\n (click)=\"onDotClick(i)\">\n </button>\n }\n </div>\n }\n\n <!-- Thumbnails -->\n @if (showThumbnails()) {\n <div class=\"c-slider__thumbnails\" \n [class.c-slider__thumbnails--vertical]=\"mergedConfig().verticalThumbnails\">\n @for (thumbnail of thumbnails(); track thumbnail.id; let i = $index) {\n <button type=\"button\"\n class=\"c-slider__thumbnail\"\n [class.c-slider__thumbnail--active]=\"isActiveThumbnail(i)\"\n [style.height]=\"mergedConfig().thumbnailHeight\"\n (click)=\"onThumbnailClick(i)\">\n <img [src]=\"thumbnail.imageUrl\" \n [alt]=\"thumbnail.alt || thumbnail.title\"\n class=\"c-slider__thumbnail-image\">\n @if (thumbnail.title) {\n <span class=\"c-slider__thumbnail-title\">{{ thumbnail.title }}</span>\n }\n </button>\n }\n </div>\n }\n\n <!-- Empty state -->\n @if (totalItems() === 0) {\n <div class=\"c-slider__empty\">\n <div class=\"c-slider__empty-icon\">\n <i class=\"icon-image\" aria-hidden=\"true\"></i>\n </div>\n <p class=\"c-slider__empty-text\">{{ 'slider.no-items' | translate }}</p>\n </div>\n }\n\n <!-- Loading state -->\n @if (isDragging()) {\n <div class=\"c-slider__loading\">\n <div class=\"c-slider__loading-spinner\"></div>\n </div>\n }\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }, { kind: "component", type: GenericButtonComponent, selector: "core-generic-button", inputs: ["config", "data"], outputs: ["buttonClick"] }] });
12707
- }
12708
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: GenericSliderComponent, decorators: [{
12709
- type: Component,
12710
- args: [{ selector: 'core-generic-slider', standalone: true, imports: [CommonModule, TranslateModule, GenericButtonComponent], template: "<div class=\"c-slider\" \n [style]=\"containerStyles()\"\n (mouseenter)=\"onMouseEnter()\"\n (mouseleave)=\"onMouseLeave()\"\n (touchstart)=\"onTouchStart($event)\"\n (touchmove)=\"onTouchMove($event)\"\n (touchend)=\"onTouchEnd()\">\n \n <!-- Main slider container -->\n <div class=\"c-slider__container\">\n \n <!-- Previous arrow -->\n @if (showArrows()) {\n <div class=\"c-slider__arrow c-slider__arrow--prev\">\n <core-generic-button\n [config]=\"prevButtonConfig()\"\n (buttonClick)=\"goToPrevious()\">\n </core-generic-button>\n </div>\n }\n\n <!-- Slides wrapper -->\n <div class=\"c-slider__wrapper\">\n <div class=\"c-slider__track\" [style]=\"slideStyles()\">\n @for (slide of items(); track slide.id; let i = $index) {\n <div class=\"c-slider__slide\" \n [class.c-slider__slide--active]=\"isActiveSlide(i)\"\n [style.width]=\"getSlideWidth()\"\n (click)=\"onSlideClick(slide, i)\">\n \n <!-- Image -->\n <div class=\"c-slider__image-container\">\n @if (mergedConfig().lazyLoad) {\n <img [src]=\"getSlideImage(slide)\" \n [alt]=\"getSlideAlt(slide)\"\n class=\"c-slider__image\"\n loading=\"lazy\">\n } @else {\n <img [src]=\"getSlideImage(slide)\" \n [alt]=\"getSlideAlt(slide)\"\n class=\"c-slider__image\">\n }\n \n <!-- File Preview Icon -->\n @if (mergedConfig().showFilePreview && slide.filePreview) {\n <div class=\"c-slider__file-preview\">\n <div class=\"c-slider__file-icon\">\n <span class=\"icon-file\" [ngClass]=\"getFileTypeIcon(slide.filePreview.fileType)\"></span>\n </div>\n <div class=\"c-slider__file-info\">\n <span class=\"c-slider__file-name\">{{ slide.filePreview.fileName }}</span>\n @if (slide.filePreview.fileSize) {\n <span class=\"c-slider__file-size\">{{ slide.filePreview.fileSize }}</span>\n }\n </div>\n </div>\n }\n \n <!-- Overlay content -->\n @if (slide.title || slide.description) {\n <div class=\"c-slider__overlay\">\n @if (slide.title) {\n <h3 class=\"c-slider__title\">{{ slide.title }}</h3>\n }\n @if (slide.description) {\n <p class=\"c-slider__description\">{{ slide.description }}</p>\n }\n </div>\n }\n </div>\n </div>\n }\n </div>\n </div>\n\n <!-- Next arrow -->\n @if (showArrows()) {\n <div class=\"c-slider__arrow c-slider__arrow--next\">\n <core-generic-button\n [config]=\"nextButtonConfig()\"\n (buttonClick)=\"goToNext()\">\n </core-generic-button>\n </div>\n }\n </div>\n\n <!-- Counter -->\n @if (showCounter()) {\n <div class=\"c-slider__counter\">\n <span class=\"c-slider__counter-text\">{{ getCounterText() }}</span>\n </div>\n }\n\n <!-- Dots navigation -->\n @if (showDots()) {\n <div class=\"c-slider__dots\">\n @for (item of items(); track item.id; let i = $index) {\n <button type=\"button\"\n class=\"c-slider__dot\"\n [class.c-slider__dot--active]=\"isActiveDot(i)\"\n [attr.aria-label]=\"'slider.go-to-slide' | translate: {number: i + 1}\"\n (click)=\"onDotClick(i)\">\n </button>\n }\n </div>\n }\n\n <!-- Thumbnails -->\n @if (showThumbnails()) {\n <div class=\"c-slider__thumbnails\" \n [class.c-slider__thumbnails--vertical]=\"mergedConfig().verticalThumbnails\">\n @for (thumbnail of thumbnails(); track thumbnail.id; let i = $index) {\n <button type=\"button\"\n class=\"c-slider__thumbnail\"\n [class.c-slider__thumbnail--active]=\"isActiveThumbnail(i)\"\n [style.height]=\"mergedConfig().thumbnailHeight\"\n (click)=\"onThumbnailClick(i)\">\n <img [src]=\"thumbnail.imageUrl\" \n [alt]=\"thumbnail.alt || thumbnail.title\"\n class=\"c-slider__thumbnail-image\">\n @if (thumbnail.title) {\n <span class=\"c-slider__thumbnail-title\">{{ thumbnail.title }}</span>\n }\n </button>\n }\n </div>\n }\n\n <!-- Empty state -->\n @if (totalItems() === 0) {\n <div class=\"c-slider__empty\">\n <div class=\"c-slider__empty-icon\">\n <i class=\"icon-image\" aria-hidden=\"true\"></i>\n </div>\n <p class=\"c-slider__empty-text\">{{ 'slider.no-items' | translate }}</p>\n </div>\n }\n\n <!-- Loading state -->\n @if (isDragging()) {\n <div class=\"c-slider__loading\">\n <div class=\"c-slider__loading-spinner\"></div>\n </div>\n }\n</div>\n" }]
12711
- }], ctorParameters: () => [], propDecorators: { onKeydown: [{
12712
- type: HostListener,
12713
- args: ['keydown', ['$event']]
12714
- }] } });
12715
-
12716
- var SliderDirection;
12717
- (function (SliderDirection) {
12718
- SliderDirection["HORIZONTAL"] = "horizontal";
12719
- SliderDirection["VERTICAL"] = "vertical";
12720
- })(SliderDirection || (SliderDirection = {}));
12721
- var SliderTransition;
12722
- (function (SliderTransition) {
12723
- SliderTransition["SLIDE"] = "slide";
12724
- SliderTransition["FADE"] = "fade";
12725
- SliderTransition["SCALE"] = "scale";
12726
- })(SliderTransition || (SliderTransition = {}));
12727
- var SliderNavigationType;
12728
- (function (SliderNavigationType) {
12729
- SliderNavigationType["DOTS"] = "dots";
12730
- SliderNavigationType["ARROWS"] = "arrows";
12731
- SliderNavigationType["THUMBNAILS"] = "thumbnails";
12732
- SliderNavigationType["COUNTER"] = "counter";
12733
- })(SliderNavigationType || (SliderNavigationType = {}));
12734
-
12735
12282
  class CarouselComponent {
12736
12283
  images = input([]);
12737
12284
  config = input({});
@@ -12746,7 +12293,7 @@ class CarouselComponent {
12746
12293
  showDots = computed(() => this.config().showDots ?? true);
12747
12294
  showArrows = computed(() => this.config().showArrows ?? true);
12748
12295
  arrowsOutside = computed(() => this.config().arrowsOutside ?? false);
12749
- itemsGap = computed(() => this.config().itemsGap ?? '0px');
12296
+ itemsGap = computed(() => this.config().itemsGap ?? '10px');
12750
12297
  controlsOffset = computed(() => this.config().controlsOffset ?? '2rem');
12751
12298
  controlsSize = computed(() => this.config().controlsSize ?? '2.5rem');
12752
12299
  ariaLabel = computed(() => this.config().ariaLabel ?? 'Galería de imágenes');
@@ -12865,30 +12412,12 @@ class CarouselComponent {
12865
12412
  'flex': `0 0 ${100 / this.perView()}%`
12866
12413
  };
12867
12414
  }
12868
- getImages() {
12869
- return this.images();
12870
- }
12871
- getCarouselClasses() {
12872
- return this.carouselClasses();
12873
- }
12874
- getShowArrows() {
12875
- return this.showArrows() && this.images().length > this.perView();
12876
- }
12877
- getShowDots() {
12878
- return this.showDots() && this.pagesLength() > 1;
12879
- }
12880
- getDots() {
12881
- return this.dots();
12882
- }
12883
- getAriaLabel() {
12884
- return this.ariaLabel();
12885
- }
12886
12415
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: CarouselComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
12887
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.0.6", type: CarouselComponent, isStandalone: true, selector: "core-carousel", inputs: { images: { classPropertyName: "images", publicName: "images", isSignal: true, isRequired: false, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "window:resize": "onResize()", "keydown": "onKeyDown($event)" } }, viewQueries: [{ propertyName: "carouselHolder", first: true, predicate: ["carouselHolder"], descendants: true, isSignal: true }, { propertyName: "carouselViewport", first: true, predicate: ["carouselViewport"], descendants: true, isSignal: true }], ngImport: i0, template: "<div \n [ngClass]=\"getCarouselClasses()\"\n [attr.aria-label]=\"getAriaLabel()\"\n tabindex=\"0\"\n #carouselViewport>\n \n <div class=\"c-img-carousel__viewport\">\n <div class=\"c-img-carousel__holder js-img-carousel-holder\" #carouselHolder>\n <div \n *ngFor=\"let image of getImages(); let i = index\"\n class=\"c-img-carousel__slide js-img-carousel-slide\"\n [ngStyle]=\"getSlideStyle(i)\">\n <div class=\"c-img-carousel__slide-inner\">\n <img \n [src]=\"image.url\" \n [alt]=\"image.alt || 'Imagen ' + (i + 1)\"\n loading=\"lazy\">\n </div>\n </div>\n </div>\n \n <!-- Botones de navegaci\u00F3n -->\n <button \n *ngIf=\"getShowArrows()\"\n class=\"c-img-carousel__btn c-img-carousel__btn--prev icon-arrow-left\"\n type=\"button\"\n (click)=\"goToPrevSlide()\"\n [attr.aria-label]=\"'Anterior'\"\n data-control=\"prevBtn\">\n </button>\n \n <button \n *ngIf=\"getShowArrows()\"\n class=\"c-img-carousel__btn c-img-carousel__btn--next icon-arrow-right\"\n type=\"button\"\n (click)=\"goToNextSlide()\"\n [attr.aria-label]=\"'Siguiente'\"\n data-control=\"nextBtn\">\n </button>\n \n <!-- Indicadores de navegaci\u00F3n (dots) -->\n <div \n *ngIf=\"getShowDots()\"\n class=\"c-img-carousel__dots js-img-carousel-nav\"\n aria-label=\"Navegaci\u00F3n\">\n <button\n *ngFor=\"let dot of getDots(); let i = index\"\n class=\"c-img-carousel__dot js-img-carousel-dot\"\n type=\"button\"\n (click)=\"goToPage(i)\"\n [attr.aria-label]=\"'Ir a p\u00E1gina ' + (i + 1)\"\n [attr.aria-current]=\"isDotActive(i) ? 'true' : 'false'\">\n </button>\n </div>\n </div>\n</div>", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
12416
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.6", type: CarouselComponent, isStandalone: true, selector: "core-carousel", inputs: { images: { classPropertyName: "images", publicName: "images", isSignal: true, isRequired: false, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "window:resize": "onResize()", "keydown": "onKeyDown($event)" } }, viewQueries: [{ propertyName: "carouselHolder", first: true, predicate: ["carouselHolder"], descendants: true, isSignal: true }, { propertyName: "carouselViewport", first: true, predicate: ["carouselViewport"], descendants: true, isSignal: true }], ngImport: i0, template: "<div \n [ngClass]=\"carouselClasses()\"\n [attr.aria-label]=\"ariaLabel()\"\n tabindex=\"0\"\n #carouselViewport>\n \n <div class=\"c-img-carousel__viewport\">\n <div class=\"c-img-carousel__holder js-img-carousel-holder\" #carouselHolder>\n <div \n *ngFor=\"let image of images(); let i = index\"\n class=\"c-img-carousel__slide js-img-carousel-slide\">\n <div class=\"c-img-carousel__slide-inner\">\n <core-image-preview\n [src]=\"image.url\"\n [alt]=\"image.alt || 'Image ' + (i + 1)\"\n [title]=\"image.title || image.alt || 'Image ' + (i + 1)\">\n </core-image-preview>\n </div>\n </div>\n </div>\n \n @if (!config().arrowsOutside) {\n <button \n *ngIf=\"showArrows()\"\n class=\"c-img-carousel__btn c-img-carousel__btn--prev icon-arrow-left\"\n type=\"button\"\n (click)=\"goToPrevSlide()\"\n [attr.aria-label]=\"'Anterior'\"\n data-control=\"prevBtn\">\n </button>\n \n <button \n *ngIf=\"showArrows()\"\n class=\"c-img-carousel__btn c-img-carousel__btn--next icon-arrow-right\"\n type=\"button\"\n (click)=\"goToNextSlide()\"\n [attr.aria-label]=\"'Siguiente'\"\n data-control=\"nextBtn\">\n </button>\n }\n \n <div \n *ngIf=\"showDots()\"\n class=\"c-img-carousel__dots js-img-carousel-nav\"\n aria-label=\"Navegaci\u00F3n\">\n <button\n *ngFor=\"let page of dots(); let i = index\"\n class=\"c-img-carousel__dot js-img-carousel-dot\"\n type=\"button\"\n (click)=\"goToPage(i)\"\n [class.c-img-carousel__dot--active]=\"currentPage() === i\"\n [attr.aria-label]=\"'Ir a p\u00E1gina ' + (i + 1)\"\n [attr.aria-current]=\"currentPage() === i ? 'true' : 'false'\">\n </button>\n </div>\n </div>\n @if(config().arrowsOutside) {\n <button \n *ngIf=\"showArrows()\"\n class=\"c-img-carousel__btn c-img-carousel__btn--prev icon-arrow-left\"\n type=\"button\"\n (click)=\"goToPrevSlide()\"\n [attr.aria-label]=\"'Anterior'\"\n data-control=\"prevBtn\">\n </button>\n \n <button \n *ngIf=\"showArrows()\"\n class=\"c-img-carousel__btn c-img-carousel__btn--next icon-arrow-right\"\n type=\"button\"\n (click)=\"goToNextSlide()\"\n [attr.aria-label]=\"'Siguiente'\"\n data-control=\"nextBtn\">\n </button>\n }\n</div>", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ImagePreviewComponent, selector: "core-image-preview", inputs: ["src", "alt", "title", "width", "height", "objectFit", "borderRadius", "cursor", "loading", "isRelative"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
12888
12417
  }
12889
12418
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImport: i0, type: CarouselComponent, decorators: [{
12890
12419
  type: Component,
12891
- args: [{ selector: 'core-carousel', standalone: true, imports: [CommonModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div \n [ngClass]=\"getCarouselClasses()\"\n [attr.aria-label]=\"getAriaLabel()\"\n tabindex=\"0\"\n #carouselViewport>\n \n <div class=\"c-img-carousel__viewport\">\n <div class=\"c-img-carousel__holder js-img-carousel-holder\" #carouselHolder>\n <div \n *ngFor=\"let image of getImages(); let i = index\"\n class=\"c-img-carousel__slide js-img-carousel-slide\"\n [ngStyle]=\"getSlideStyle(i)\">\n <div class=\"c-img-carousel__slide-inner\">\n <img \n [src]=\"image.url\" \n [alt]=\"image.alt || 'Imagen ' + (i + 1)\"\n loading=\"lazy\">\n </div>\n </div>\n </div>\n \n <!-- Botones de navegaci\u00F3n -->\n <button \n *ngIf=\"getShowArrows()\"\n class=\"c-img-carousel__btn c-img-carousel__btn--prev icon-arrow-left\"\n type=\"button\"\n (click)=\"goToPrevSlide()\"\n [attr.aria-label]=\"'Anterior'\"\n data-control=\"prevBtn\">\n </button>\n \n <button \n *ngIf=\"getShowArrows()\"\n class=\"c-img-carousel__btn c-img-carousel__btn--next icon-arrow-right\"\n type=\"button\"\n (click)=\"goToNextSlide()\"\n [attr.aria-label]=\"'Siguiente'\"\n data-control=\"nextBtn\">\n </button>\n \n <!-- Indicadores de navegaci\u00F3n (dots) -->\n <div \n *ngIf=\"getShowDots()\"\n class=\"c-img-carousel__dots js-img-carousel-nav\"\n aria-label=\"Navegaci\u00F3n\">\n <button\n *ngFor=\"let dot of getDots(); let i = index\"\n class=\"c-img-carousel__dot js-img-carousel-dot\"\n type=\"button\"\n (click)=\"goToPage(i)\"\n [attr.aria-label]=\"'Ir a p\u00E1gina ' + (i + 1)\"\n [attr.aria-current]=\"isDotActive(i) ? 'true' : 'false'\">\n </button>\n </div>\n </div>\n</div>" }]
12420
+ args: [{ selector: 'core-carousel', standalone: true, imports: [CommonModule, ImagePreviewComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div \n [ngClass]=\"carouselClasses()\"\n [attr.aria-label]=\"ariaLabel()\"\n tabindex=\"0\"\n #carouselViewport>\n \n <div class=\"c-img-carousel__viewport\">\n <div class=\"c-img-carousel__holder js-img-carousel-holder\" #carouselHolder>\n <div \n *ngFor=\"let image of images(); let i = index\"\n class=\"c-img-carousel__slide js-img-carousel-slide\">\n <div class=\"c-img-carousel__slide-inner\">\n <core-image-preview\n [src]=\"image.url\"\n [alt]=\"image.alt || 'Image ' + (i + 1)\"\n [title]=\"image.title || image.alt || 'Image ' + (i + 1)\">\n </core-image-preview>\n </div>\n </div>\n </div>\n \n @if (!config().arrowsOutside) {\n <button \n *ngIf=\"showArrows()\"\n class=\"c-img-carousel__btn c-img-carousel__btn--prev icon-arrow-left\"\n type=\"button\"\n (click)=\"goToPrevSlide()\"\n [attr.aria-label]=\"'Anterior'\"\n data-control=\"prevBtn\">\n </button>\n \n <button \n *ngIf=\"showArrows()\"\n class=\"c-img-carousel__btn c-img-carousel__btn--next icon-arrow-right\"\n type=\"button\"\n (click)=\"goToNextSlide()\"\n [attr.aria-label]=\"'Siguiente'\"\n data-control=\"nextBtn\">\n </button>\n }\n \n <div \n *ngIf=\"showDots()\"\n class=\"c-img-carousel__dots js-img-carousel-nav\"\n aria-label=\"Navegaci\u00F3n\">\n <button\n *ngFor=\"let page of dots(); let i = index\"\n class=\"c-img-carousel__dot js-img-carousel-dot\"\n type=\"button\"\n (click)=\"goToPage(i)\"\n [class.c-img-carousel__dot--active]=\"currentPage() === i\"\n [attr.aria-label]=\"'Ir a p\u00E1gina ' + (i + 1)\"\n [attr.aria-current]=\"currentPage() === i ? 'true' : 'false'\">\n </button>\n </div>\n </div>\n @if(config().arrowsOutside) {\n <button \n *ngIf=\"showArrows()\"\n class=\"c-img-carousel__btn c-img-carousel__btn--prev icon-arrow-left\"\n type=\"button\"\n (click)=\"goToPrevSlide()\"\n [attr.aria-label]=\"'Anterior'\"\n data-control=\"prevBtn\">\n </button>\n \n <button \n *ngIf=\"showArrows()\"\n class=\"c-img-carousel__btn c-img-carousel__btn--next icon-arrow-right\"\n type=\"button\"\n (click)=\"goToNextSlide()\"\n [attr.aria-label]=\"'Siguiente'\"\n data-control=\"nextBtn\">\n </button>\n }\n</div>" }]
12892
12421
  }], ctorParameters: () => [], propDecorators: { onResize: [{
12893
12422
  type: HostListener,
12894
12423
  args: ['window:resize']
@@ -13224,5 +12753,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.6", ngImpor
13224
12753
  * Generated bundle index. Do not edit.
13225
12754
  */
13226
12755
 
13227
- export { ActiveFiltersComponent, AlertComponent, AlertContainerComponent, AlertService, AlertType, ApiConfigurationProvider, BaseFieldComponent, ButtonContext, ButtonSize, ButtonType, CacheBustingInterceptor, CardComponent, CarouselComponent, CheckboxFieldComponent, ConfigurationModel, ConfirmationDialogComponent, ConfirmationDialogService, CoreHostDirective, CoreUiHttpLoaderFactory, CoreUiTranslateLoader, CoreUiTranslateService, DataListComponent, DataListItemComponent, DateFieldComponent, DateUtility, DatetimeFieldComponent, DialogActions, DocumentAction, DocumentDisplayMode, DropdownComponent, DropdownDirection, DropdownService, DynamicFieldDirective, FieldErrorsComponent, FieldType, FileFieldComponent, FileModel, FileTemplateModel, FileTemplateType, FileType, FileTypeModel, FileUploadService, FilterModalComponent, FilterService, FilterType, GenericButtonComponent, GenericDocumentationComponent, GenericModalComponent, GenericPaginationComponent, GenericRatingComponent, GenericSidebarComponent, GenericSliderComponent, GenericStepsComponent, GenericTableComponent, GenericTabsComponent, GenericTimelineComponent, GlobalApiConfigService, HeaderComponent, HeaderConfigurationService, HeaderElementType, HeaderService, HttpLoaderFactory, ImageModalComponent, ImageModalService, ImagePreviewComponent, LayoutAuth, LayoutBreakpoint, LayoutComponent, LayoutService, LayoutStateService, LayoutType, LoaderComponent, LoaderService, MainNavComponent, MainNavService, ModalMode, ModelApiService, MultiEntryFieldComponent, MultiEntryOutputFormat, NumberFieldComponent, NumberFieldConfigType, NumberFieldType, NumberRange, PERMISSION_ACTIONS_PROVIDER, PERMISSION_PROVIDER, PERMISSION_RESOURCES_PROVIDER, PaginationService, PasswordFieldComponent, PermissionEnumsService, PermissionModel, PermissionService, PermissionWrapperService, PermissionsActions, PermissionsInterceptor, PermissionsResources, ProgressBarComponent, ProgressBarSize, RatingService, RatingSize, RatingType, ResetPasswordModel, RoleModel, SelectFieldComponent, ServerSelectFieldComponent, ServerSelectService, SidebarCustomModalComponent, SidebarCustomModalService, SidebarHeight, SidebarMobileModalService, SidebarMobileType, SidebarPosition, SidebarService, SidebarState, SidebarTemplateRegistryService, SidebarVisibility, SidebarWidth, SliderActionType, SliderDirection, SliderNavigationType, SliderService, SliderTransition, SmartFieldComponent, StepSize, StepStatus, StepType, StepsService, SwitchFieldComponent, TableAction, TableActionService, TableDataService, TextAreaFieldComponent, TextFieldComponent, TimeFieldComponent, TimeInterval, TimelineService, TimelineStatus, TimelineType, TranslationMergeService, UsersModel, VERSION, equalToValidator, isSameDate, provideCoreUiTranslateLoader, providePermissionActions, providePermissionEnums, providePermissionResources, providePermissionService, providePermissionServiceFactory, provideTranslateLoader };
12756
+ export { ActiveFiltersComponent, AlertComponent, AlertContainerComponent, AlertService, AlertType, ApiConfigurationProvider, BaseFieldComponent, ButtonContext, ButtonSize, ButtonType, CacheBustingInterceptor, CardComponent, CarouselComponent, CheckboxFieldComponent, ConfigurationModel, ConfirmationDialogComponent, ConfirmationDialogService, CoreHostDirective, CoreUiHttpLoaderFactory, CoreUiTranslateLoader, CoreUiTranslateService, DataListComponent, DataListItemComponent, DateFieldComponent, DateUtility, DatetimeFieldComponent, DialogActions, DocumentAction, DocumentDisplayMode, DropdownComponent, DropdownDirection, DropdownService, DynamicFieldDirective, FieldErrorsComponent, FieldType, FileFieldComponent, FileModel, FileTemplateModel, FileTemplateType, FileType, FileTypeModel, FileUploadService, FilterModalComponent, FilterService, FilterType, GenericButtonComponent, GenericDocumentationComponent, GenericModalComponent, GenericPaginationComponent, GenericRatingComponent, GenericSidebarComponent, GenericStepsComponent, GenericTableComponent, GenericTabsComponent, GenericTimelineComponent, GlobalApiConfigService, HeaderComponent, HeaderConfigurationService, HeaderElementType, HeaderService, HttpLoaderFactory, ImageModalComponent, ImageModalService, ImagePreviewComponent, LayoutAuth, LayoutBreakpoint, LayoutComponent, LayoutService, LayoutStateService, LayoutType, LoaderComponent, LoaderService, MainNavComponent, MainNavService, ModalMode, ModelApiService, MultiEntryFieldComponent, MultiEntryOutputFormat, NumberFieldComponent, NumberFieldConfigType, NumberFieldType, NumberRange, PERMISSION_ACTIONS_PROVIDER, PERMISSION_PROVIDER, PERMISSION_RESOURCES_PROVIDER, PaginationService, PasswordFieldComponent, PermissionEnumsService, PermissionModel, PermissionService, PermissionWrapperService, PermissionsActions, PermissionsInterceptor, PermissionsResources, ProgressBarComponent, ProgressBarSize, RatingService, RatingSize, RatingType, ResetPasswordModel, RoleModel, SelectFieldComponent, ServerSelectFieldComponent, ServerSelectService, SidebarCustomModalComponent, SidebarCustomModalService, SidebarHeight, SidebarMobileModalService, SidebarMobileType, SidebarPosition, SidebarService, SidebarState, SidebarTemplateRegistryService, SidebarVisibility, SidebarWidth, SmartFieldComponent, StepSize, StepStatus, StepType, StepsService, SwitchFieldComponent, TableAction, TableActionService, TableDataService, TextAreaFieldComponent, TextFieldComponent, TimeFieldComponent, TimeInterval, TimelineService, TimelineStatus, TimelineType, TranslationMergeService, UsersModel, VERSION, equalToValidator, isSameDate, provideCoreUiTranslateLoader, providePermissionActions, providePermissionEnums, providePermissionResources, providePermissionService, providePermissionServiceFactory, provideTranslateLoader };
13228
12757
  //# sourceMappingURL=solcre-org-core-ui.mjs.map