@ks89/angular-modal-gallery 14.0.0 → 15.0.0-alpha.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.
- package/CHANGELOG.md +21 -0
- package/README.md +3 -2
- package/fesm2022/ks89-angular-modal-gallery.mjs +1062 -1010
- package/fesm2022/ks89-angular-modal-gallery.mjs.map +1 -1
- package/index.d.ts +493 -546
- package/package.json +2 -2
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { ChangeDetectionStrategy, Component, Injectable,
|
|
2
|
+
import { ChangeDetectionStrategy, Component, Injectable, input, inject, Renderer2, ElementRef, Directive, output, HostListener, ChangeDetectorRef, HostBinding, PLATFORM_ID, NgZone, InjectionToken, EventEmitter, viewChild, SecurityContext, Injector, provideAppInitializer, NgModule } from '@angular/core';
|
|
3
3
|
import { NgClass, isPlatformBrowser, NgTemplateOutlet, NgStyle, CommonModule } from '@angular/common';
|
|
4
|
-
import
|
|
5
|
-
import { OverlayConfig, OverlayModule } from '@angular/cdk/overlay';
|
|
4
|
+
import { Overlay, OverlayConfig, OverlayModule } from '@angular/cdk/overlay';
|
|
6
5
|
import { Subject, timer } from 'rxjs';
|
|
7
6
|
import { map, filter, switchMap, takeUntil } from 'rxjs/operators';
|
|
8
|
-
import
|
|
9
|
-
import { Breakpoints } from '@angular/cdk/layout';
|
|
10
|
-
import * as i2 from '@angular/platform-browser';
|
|
7
|
+
import { DomSanitizer } from '@angular/platform-browser';
|
|
8
|
+
import { BreakpointObserver, Breakpoints } from '@angular/cdk/layout';
|
|
11
9
|
import { ComponentPortal } from '@angular/cdk/portal';
|
|
12
10
|
|
|
13
11
|
/*
|
|
@@ -143,8 +141,6 @@ const NOTHING = 0;
|
|
|
143
141
|
* and another with also the direction (right or left).
|
|
144
142
|
*/
|
|
145
143
|
class AccessibleComponent {
|
|
146
|
-
constructor() {
|
|
147
|
-
}
|
|
148
144
|
/**
|
|
149
145
|
* Method to handle navigation events with both Keyboard and Mouse.
|
|
150
146
|
* @param direction string of the navigation that can be either 'next' or 'prev'
|
|
@@ -240,7 +236,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImpor
|
|
|
240
236
|
template: ``,
|
|
241
237
|
changeDetection: ChangeDetectionStrategy.OnPush
|
|
242
238
|
}]
|
|
243
|
-
}]
|
|
239
|
+
}] });
|
|
244
240
|
|
|
245
241
|
/*
|
|
246
242
|
The MIT License (MIT)
|
|
@@ -610,6 +606,40 @@ var LoadingType;
|
|
|
610
606
|
LoadingType[LoadingType["EXPLOSING_SQUARES"] = 7] = "EXPLOSING_SQUARES";
|
|
611
607
|
})(LoadingType || (LoadingType = {}));
|
|
612
608
|
|
|
609
|
+
/*
|
|
610
|
+
The MIT License (MIT)
|
|
611
|
+
|
|
612
|
+
Copyright (c) 2017-2025 Stefano Cappa (Ks89)
|
|
613
|
+
|
|
614
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
615
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
616
|
+
in the Software without restriction, including without limitation the rights
|
|
617
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
618
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
619
|
+
furnished to do so, subject to the following conditions:
|
|
620
|
+
|
|
621
|
+
The above copyright notice and this permission notice shall be included in all
|
|
622
|
+
copies or substantial portions of the Software.
|
|
623
|
+
|
|
624
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
625
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
626
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL THE
|
|
627
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
628
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
629
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
630
|
+
SOFTWARE.
|
|
631
|
+
*/
|
|
632
|
+
/**
|
|
633
|
+
* Enum `Keyboard` with keys and their relative codes.
|
|
634
|
+
*/
|
|
635
|
+
const Keyboard = {
|
|
636
|
+
ESC: ESC_CODE,
|
|
637
|
+
LEFT_ARROW: LEFT_ARROW_CODE,
|
|
638
|
+
RIGHT_ARROW: RIGHT_ARROW_CODE,
|
|
639
|
+
UP_ARROW: UP_ARROW_CODE,
|
|
640
|
+
DOWN_ARROW: DOWN_ARROW_CODE
|
|
641
|
+
};
|
|
642
|
+
|
|
613
643
|
/*
|
|
614
644
|
The MIT License (MIT)
|
|
615
645
|
|
|
@@ -647,13 +677,21 @@ const DEFAULT_DESCRIPTION_STYLE = {
|
|
|
647
677
|
marginTop: '0px',
|
|
648
678
|
marginBottom: '0px',
|
|
649
679
|
marginLeft: '0px',
|
|
650
|
-
marginRight: '0px'
|
|
680
|
+
marginRight: '0px',
|
|
681
|
+
width: '',
|
|
682
|
+
height: '',
|
|
683
|
+
position: '',
|
|
684
|
+
top: '',
|
|
685
|
+
bottom: '',
|
|
686
|
+
left: '',
|
|
687
|
+
right: ''
|
|
651
688
|
};
|
|
652
689
|
const DEFAULT_DESCRIPTION = {
|
|
653
690
|
strategy: DescriptionStrategy.ALWAYS_VISIBLE,
|
|
654
691
|
imageText: 'Image ',
|
|
655
692
|
numberSeparator: '/',
|
|
656
693
|
beforeTextDescription: ' - ',
|
|
694
|
+
customFullDescription: '',
|
|
657
695
|
style: DEFAULT_DESCRIPTION_STYLE
|
|
658
696
|
};
|
|
659
697
|
const DEFAULT_CAROUSEL_DESCRIPTION = {
|
|
@@ -661,6 +699,7 @@ const DEFAULT_CAROUSEL_DESCRIPTION = {
|
|
|
661
699
|
imageText: 'Image ',
|
|
662
700
|
numberSeparator: '/',
|
|
663
701
|
beforeTextDescription: ' - ',
|
|
702
|
+
customFullDescription: '',
|
|
664
703
|
style: DEFAULT_DESCRIPTION_STYLE
|
|
665
704
|
};
|
|
666
705
|
const DEFAULT_CURRENT_IMAGE_CONFIG = {
|
|
@@ -707,7 +746,13 @@ const DEFAULT_PREVIEW_CONFIG = {
|
|
|
707
746
|
number: 3,
|
|
708
747
|
arrows: true,
|
|
709
748
|
clickable: true,
|
|
710
|
-
size: DEFAULT_PREVIEW_SIZE
|
|
749
|
+
size: DEFAULT_PREVIEW_SIZE,
|
|
750
|
+
mobileVisible: false
|
|
751
|
+
};
|
|
752
|
+
const DEFAULT_KEYBOARD_CONFIG = {
|
|
753
|
+
esc: Keyboard.ESC,
|
|
754
|
+
right: Keyboard.RIGHT_ARROW,
|
|
755
|
+
left: Keyboard.LEFT_ARROW
|
|
711
756
|
};
|
|
712
757
|
const DEFAULT_CONFIG = Object.freeze({
|
|
713
758
|
slideConfig: DEFAULT_SLIDE_CONFIG,
|
|
@@ -717,7 +762,7 @@ const DEFAULT_CONFIG = Object.freeze({
|
|
|
717
762
|
dotsConfig: { visible: true },
|
|
718
763
|
plainGalleryConfig: DEFAULT_PLAIN_CONFIG,
|
|
719
764
|
currentImageConfig: DEFAULT_CURRENT_IMAGE_CONFIG,
|
|
720
|
-
keyboardConfig:
|
|
765
|
+
keyboardConfig: DEFAULT_KEYBOARD_CONFIG,
|
|
721
766
|
carouselConfig: DEFAULT_CURRENT_CAROUSEL_CONFIG,
|
|
722
767
|
carouselImageConfig: DEFAULT_CAROUSEL_IMAGE_CONFIG,
|
|
723
768
|
carouselPreviewsConfig: DEFAULT_CAROUSEL_PREVIEWS_CONFIG,
|
|
@@ -1018,9 +1063,13 @@ function initPlainGalleryConfig(plainGalleryConfig) {
|
|
|
1018
1063
|
* Directive to change the max size of an element.
|
|
1019
1064
|
*/
|
|
1020
1065
|
class MaxSizeDirective {
|
|
1021
|
-
constructor(
|
|
1022
|
-
|
|
1023
|
-
|
|
1066
|
+
constructor() {
|
|
1067
|
+
/**
|
|
1068
|
+
* Object of type `MaxSize` to resize the element.
|
|
1069
|
+
*/
|
|
1070
|
+
this.maxSizeConfig = input(...(ngDevMode ? [undefined, { debugName: "maxSizeConfig" }] : []));
|
|
1071
|
+
this.renderer = inject(Renderer2);
|
|
1072
|
+
this.el = inject(ElementRef);
|
|
1024
1073
|
}
|
|
1025
1074
|
/**
|
|
1026
1075
|
* Method ´ngOnInit´ to apply the style of this directive.
|
|
@@ -1042,25 +1091,24 @@ class MaxSizeDirective {
|
|
|
1042
1091
|
* Private method to change both max-width and max-height of an element.
|
|
1043
1092
|
*/
|
|
1044
1093
|
applyStyle() {
|
|
1045
|
-
|
|
1094
|
+
const maxSizeConfig = this.maxSizeConfig();
|
|
1095
|
+
if (!maxSizeConfig) {
|
|
1046
1096
|
return;
|
|
1047
1097
|
}
|
|
1048
|
-
if (
|
|
1049
|
-
this.renderer.setStyle(this.el.nativeElement, 'max-width',
|
|
1098
|
+
if (maxSizeConfig.maxWidth) {
|
|
1099
|
+
this.renderer.setStyle(this.el.nativeElement, 'max-width', maxSizeConfig.maxWidth);
|
|
1050
1100
|
}
|
|
1051
|
-
if (
|
|
1052
|
-
this.renderer.setStyle(this.el.nativeElement, 'max-height',
|
|
1101
|
+
if (maxSizeConfig.maxHeight) {
|
|
1102
|
+
this.renderer.setStyle(this.el.nativeElement, 'max-height', maxSizeConfig.maxHeight);
|
|
1053
1103
|
}
|
|
1054
1104
|
}
|
|
1055
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: MaxSizeDirective, deps: [
|
|
1056
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
1105
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: MaxSizeDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1106
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.1.7", type: MaxSizeDirective, isStandalone: true, selector: "[ksMaxSize]", inputs: { maxSizeConfig: { classPropertyName: "maxSizeConfig", publicName: "maxSizeConfig", isSignal: true, isRequired: false, transformFunction: null } }, usesOnChanges: true, ngImport: i0 }); }
|
|
1057
1107
|
}
|
|
1058
1108
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: MaxSizeDirective, decorators: [{
|
|
1059
1109
|
type: Directive,
|
|
1060
1110
|
args: [{ selector: '[ksMaxSize]' }]
|
|
1061
|
-
}]
|
|
1062
|
-
type: Input
|
|
1063
|
-
}] } });
|
|
1111
|
+
}] });
|
|
1064
1112
|
|
|
1065
1113
|
/*
|
|
1066
1114
|
The MIT License (MIT)
|
|
@@ -1089,9 +1137,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImpor
|
|
|
1089
1137
|
* Directive to change the size of an element.
|
|
1090
1138
|
*/
|
|
1091
1139
|
class SizeDirective {
|
|
1092
|
-
constructor(
|
|
1093
|
-
|
|
1094
|
-
|
|
1140
|
+
constructor() {
|
|
1141
|
+
/**
|
|
1142
|
+
* Object of type `Size` to resize the element.
|
|
1143
|
+
*/
|
|
1144
|
+
this.sizeConfig = input(...(ngDevMode ? [undefined, { debugName: "sizeConfig" }] : []));
|
|
1145
|
+
this.renderer = inject(Renderer2);
|
|
1146
|
+
this.el = inject(ElementRef);
|
|
1095
1147
|
}
|
|
1096
1148
|
/**
|
|
1097
1149
|
* Method ´ngOnInit´ to apply the style of this directive.
|
|
@@ -1113,26 +1165,25 @@ class SizeDirective {
|
|
|
1113
1165
|
* Private method to change both width and height of an element.
|
|
1114
1166
|
*/
|
|
1115
1167
|
applyStyle() {
|
|
1116
|
-
|
|
1168
|
+
const sizeConfig = this.sizeConfig();
|
|
1169
|
+
if (!sizeConfig) {
|
|
1117
1170
|
return;
|
|
1118
1171
|
}
|
|
1119
1172
|
// apply [style.width]
|
|
1120
|
-
if (
|
|
1121
|
-
this.renderer.setStyle(this.el.nativeElement, 'width',
|
|
1173
|
+
if (sizeConfig.width) {
|
|
1174
|
+
this.renderer.setStyle(this.el.nativeElement, 'width', sizeConfig.width);
|
|
1122
1175
|
}
|
|
1123
|
-
if (
|
|
1124
|
-
this.renderer.setStyle(this.el.nativeElement, 'height',
|
|
1176
|
+
if (sizeConfig.height) {
|
|
1177
|
+
this.renderer.setStyle(this.el.nativeElement, 'height', sizeConfig.height);
|
|
1125
1178
|
}
|
|
1126
1179
|
}
|
|
1127
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: SizeDirective, deps: [
|
|
1128
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
1180
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: SizeDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1181
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.1.7", type: SizeDirective, isStandalone: true, selector: "[ksSize]", inputs: { sizeConfig: { classPropertyName: "sizeConfig", publicName: "sizeConfig", isSignal: true, isRequired: false, transformFunction: null } }, usesOnChanges: true, ngImport: i0 }); }
|
|
1129
1182
|
}
|
|
1130
1183
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: SizeDirective, decorators: [{
|
|
1131
1184
|
type: Directive,
|
|
1132
1185
|
args: [{ selector: '[ksSize]' }]
|
|
1133
|
-
}]
|
|
1134
|
-
type: Input
|
|
1135
|
-
}] } });
|
|
1186
|
+
}] });
|
|
1136
1187
|
|
|
1137
1188
|
/*
|
|
1138
1189
|
The MIT License (MIT)
|
|
@@ -1161,30 +1212,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImpor
|
|
|
1161
1212
|
* Directive to add fallback image if the original one is not reachable.
|
|
1162
1213
|
*/
|
|
1163
1214
|
class FallbackImageDirective {
|
|
1164
|
-
constructor(
|
|
1165
|
-
this.
|
|
1166
|
-
this.
|
|
1167
|
-
this.
|
|
1215
|
+
constructor() {
|
|
1216
|
+
this.fallbackImg = input(...(ngDevMode ? [undefined, { debugName: "fallbackImg" }] : []));
|
|
1217
|
+
this.fallbackApplied = output();
|
|
1218
|
+
this.renderer = inject(Renderer2);
|
|
1219
|
+
this.el = inject(ElementRef);
|
|
1168
1220
|
}
|
|
1169
1221
|
onError() {
|
|
1170
|
-
|
|
1222
|
+
const fallbackImg = this.fallbackImg();
|
|
1223
|
+
if (!fallbackImg) {
|
|
1171
1224
|
this.fallbackApplied.emit(false);
|
|
1172
1225
|
return;
|
|
1173
1226
|
}
|
|
1174
|
-
this.renderer.setAttribute(this.el.nativeElement, 'src',
|
|
1227
|
+
this.renderer.setAttribute(this.el.nativeElement, 'src', fallbackImg.toString());
|
|
1175
1228
|
this.fallbackApplied.emit(true);
|
|
1176
1229
|
}
|
|
1177
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: FallbackImageDirective, deps: [
|
|
1178
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
1230
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: FallbackImageDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1231
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.1.7", type: FallbackImageDirective, isStandalone: true, selector: "[ksFallbackImage]", inputs: { fallbackImg: { classPropertyName: "fallbackImg", publicName: "fallbackImg", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { fallbackApplied: "fallbackApplied" }, host: { listeners: { "error": "onError()" } }, ngImport: i0 }); }
|
|
1179
1232
|
}
|
|
1180
1233
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: FallbackImageDirective, decorators: [{
|
|
1181
1234
|
type: Directive,
|
|
1182
1235
|
args: [{ selector: '[ksFallbackImage]' }]
|
|
1183
|
-
}],
|
|
1184
|
-
type: Input
|
|
1185
|
-
}], fallbackApplied: [{
|
|
1186
|
-
type: Output
|
|
1187
|
-
}], onError: [{
|
|
1236
|
+
}], propDecorators: { onError: [{
|
|
1188
1237
|
type: HostListener,
|
|
1189
1238
|
args: ['error']
|
|
1190
1239
|
}] } });
|
|
@@ -1216,9 +1265,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImpor
|
|
|
1216
1265
|
* Directive to customize the description.
|
|
1217
1266
|
*/
|
|
1218
1267
|
class DescriptionDirective {
|
|
1219
|
-
constructor(
|
|
1220
|
-
|
|
1221
|
-
|
|
1268
|
+
constructor() {
|
|
1269
|
+
/**
|
|
1270
|
+
* Object of type `Description` to resize the element.
|
|
1271
|
+
*/
|
|
1272
|
+
this.description = input(...(ngDevMode ? [undefined, { debugName: "description" }] : []));
|
|
1273
|
+
this.renderer = inject(Renderer2);
|
|
1274
|
+
this.el = inject(ElementRef);
|
|
1222
1275
|
}
|
|
1223
1276
|
/**
|
|
1224
1277
|
* Method ´ngOnInit´ to apply the style of this directive.
|
|
@@ -1240,48 +1293,48 @@ class DescriptionDirective {
|
|
|
1240
1293
|
* Private method to change description's style.
|
|
1241
1294
|
*/
|
|
1242
1295
|
applyStyle() {
|
|
1243
|
-
|
|
1296
|
+
const description = this.description();
|
|
1297
|
+
if (!description) {
|
|
1244
1298
|
return;
|
|
1245
1299
|
}
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
this.renderer.setStyle(this.el.nativeElement, '
|
|
1249
|
-
|
|
1250
|
-
|
|
1300
|
+
console.log('description ', description);
|
|
1301
|
+
if (description.style) {
|
|
1302
|
+
this.renderer.setStyle(this.el.nativeElement, 'background', description.style.bgColor);
|
|
1303
|
+
this.renderer.setStyle(this.el.nativeElement, 'color', description.style.textColor);
|
|
1304
|
+
if (description.style.width) {
|
|
1305
|
+
this.renderer.setStyle(this.el.nativeElement, 'width', description.style.width);
|
|
1251
1306
|
}
|
|
1252
|
-
if (
|
|
1253
|
-
this.renderer.setStyle(this.el.nativeElement, 'height',
|
|
1307
|
+
if (description.style.height) {
|
|
1308
|
+
this.renderer.setStyle(this.el.nativeElement, 'height', description.style.height);
|
|
1254
1309
|
}
|
|
1255
|
-
if (
|
|
1256
|
-
this.renderer.setStyle(this.el.nativeElement, 'position',
|
|
1310
|
+
if (description.style.position) {
|
|
1311
|
+
this.renderer.setStyle(this.el.nativeElement, 'position', description.style.position);
|
|
1257
1312
|
}
|
|
1258
|
-
if (
|
|
1259
|
-
this.renderer.setStyle(this.el.nativeElement, 'top',
|
|
1313
|
+
if (description.style.top) {
|
|
1314
|
+
this.renderer.setStyle(this.el.nativeElement, 'top', description.style.top);
|
|
1260
1315
|
}
|
|
1261
|
-
if (
|
|
1262
|
-
this.renderer.setStyle(this.el.nativeElement, 'bottom',
|
|
1316
|
+
if (description.style.bottom) {
|
|
1317
|
+
this.renderer.setStyle(this.el.nativeElement, 'bottom', description.style.bottom);
|
|
1263
1318
|
}
|
|
1264
|
-
if (
|
|
1265
|
-
this.renderer.setStyle(this.el.nativeElement, 'left',
|
|
1319
|
+
if (description.style.left) {
|
|
1320
|
+
this.renderer.setStyle(this.el.nativeElement, 'left', description.style.left);
|
|
1266
1321
|
}
|
|
1267
|
-
if (
|
|
1268
|
-
this.renderer.setStyle(this.el.nativeElement, 'right',
|
|
1322
|
+
if (description.style.right) {
|
|
1323
|
+
this.renderer.setStyle(this.el.nativeElement, 'right', description.style.right);
|
|
1269
1324
|
}
|
|
1270
|
-
this.renderer.setStyle(this.el.nativeElement, 'margin-top',
|
|
1271
|
-
this.renderer.setStyle(this.el.nativeElement, 'margin-bottom',
|
|
1272
|
-
this.renderer.setStyle(this.el.nativeElement, 'margin-left',
|
|
1273
|
-
this.renderer.setStyle(this.el.nativeElement, 'margin-right',
|
|
1325
|
+
this.renderer.setStyle(this.el.nativeElement, 'margin-top', description.style.marginTop ? description.style.marginTop : '0px');
|
|
1326
|
+
this.renderer.setStyle(this.el.nativeElement, 'margin-bottom', description.style.marginBottom ? description.style.marginBottom : '0px');
|
|
1327
|
+
this.renderer.setStyle(this.el.nativeElement, 'margin-left', description.style.marginLeft ? description.style.marginLeft : '0px');
|
|
1328
|
+
this.renderer.setStyle(this.el.nativeElement, 'margin-right', description.style.marginRight ? description.style.marginRight : '0px');
|
|
1274
1329
|
}
|
|
1275
1330
|
}
|
|
1276
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: DescriptionDirective, deps: [
|
|
1277
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
1331
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: DescriptionDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1332
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.1.7", type: DescriptionDirective, isStandalone: true, selector: "[ksDescription]", inputs: { description: { classPropertyName: "description", publicName: "description", isSignal: true, isRequired: false, transformFunction: null } }, usesOnChanges: true, ngImport: i0 }); }
|
|
1278
1333
|
}
|
|
1279
1334
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: DescriptionDirective, decorators: [{
|
|
1280
1335
|
type: Directive,
|
|
1281
1336
|
args: [{ selector: '[ksDescription]' }]
|
|
1282
|
-
}]
|
|
1283
|
-
type: Input
|
|
1284
|
-
}] } });
|
|
1337
|
+
}] });
|
|
1285
1338
|
|
|
1286
1339
|
/*
|
|
1287
1340
|
The MIT License (MIT)
|
|
@@ -1310,37 +1363,37 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImpor
|
|
|
1310
1363
|
* Component with clickable dots (small circles) to navigate between images inside the modal gallery.
|
|
1311
1364
|
*/
|
|
1312
1365
|
class DotsComponent extends AccessibleComponent {
|
|
1313
|
-
constructor(
|
|
1314
|
-
super();
|
|
1315
|
-
|
|
1366
|
+
constructor() {
|
|
1367
|
+
super(...arguments);
|
|
1368
|
+
/**
|
|
1369
|
+
* Unique id (>=0) of the current instance of this library. This is required when you are using
|
|
1370
|
+
* the service to call modal gallery.
|
|
1371
|
+
*/
|
|
1372
|
+
this.id = input.required(...(ngDevMode ? [{ debugName: "id" }] : []));
|
|
1373
|
+
/**
|
|
1374
|
+
* Object of type `InternalLibImage` that represent the visible image.
|
|
1375
|
+
*/
|
|
1376
|
+
this.currentImage = input.required(...(ngDevMode ? [{ debugName: "currentImage" }] : []));
|
|
1377
|
+
/**
|
|
1378
|
+
* Array of `InternalLibImage` that represent the model of this library with all images,
|
|
1379
|
+
* thumbs and so on.
|
|
1380
|
+
*/
|
|
1381
|
+
this.images = input.required(...(ngDevMode ? [{ debugName: "images" }] : []));
|
|
1382
|
+
/**
|
|
1383
|
+
* Object of type `DotsConfig` to init DotsComponent's features.
|
|
1384
|
+
* For instance, it contains a param to show/hide this component.
|
|
1385
|
+
*/
|
|
1386
|
+
this.dotsConfig = input.required(...(ngDevMode ? [{ debugName: "dotsConfig" }] : []));
|
|
1387
|
+
/**
|
|
1388
|
+
* Object of type `AccessibilityConfig` to init custom accessibility features.
|
|
1389
|
+
* For instance, it contains titles, alt texts, aria-labels and so on.
|
|
1390
|
+
*/
|
|
1391
|
+
this.accessibilityConfig = input.required(...(ngDevMode ? [{ debugName: "accessibilityConfig" }] : []));
|
|
1316
1392
|
/**
|
|
1317
1393
|
* Output to emit clicks on dots. The payload contains a number that represent
|
|
1318
1394
|
* the index of the clicked dot.
|
|
1319
1395
|
*/
|
|
1320
|
-
this.clickDot =
|
|
1321
|
-
}
|
|
1322
|
-
/**
|
|
1323
|
-
* Method ´ngOnInit´ to build `configDots` applying a default value.
|
|
1324
|
-
* This is an angular lifecycle hook, so its called automatically by Angular itself.
|
|
1325
|
-
* In particular, it's called only one time!!!
|
|
1326
|
-
*/
|
|
1327
|
-
ngOnInit() {
|
|
1328
|
-
const libConfig = this.configService.getConfig(this.id);
|
|
1329
|
-
if (!libConfig) {
|
|
1330
|
-
throw new Error('Internal library error - libConfig must be defined');
|
|
1331
|
-
}
|
|
1332
|
-
this.accessibilityConfig = libConfig.accessibilityConfig;
|
|
1333
|
-
this.configDots = Object.assign({}, this.dotsConfig);
|
|
1334
|
-
}
|
|
1335
|
-
/**
|
|
1336
|
-
* Method ´ngOnChanges´ to change `configDots` if the input dotsConfig is changed.
|
|
1337
|
-
* This is an angular lifecycle hook, so its called automatically by Angular itself.
|
|
1338
|
-
*/
|
|
1339
|
-
ngOnChanges(changes) {
|
|
1340
|
-
const dotsConfigChanges = changes['dotsConfig'];
|
|
1341
|
-
if (dotsConfigChanges && dotsConfigChanges.currentValue !== dotsConfigChanges.previousValue) {
|
|
1342
|
-
this.configDots = dotsConfigChanges.currentValue;
|
|
1343
|
-
}
|
|
1396
|
+
this.clickDot = output();
|
|
1344
1397
|
}
|
|
1345
1398
|
/**
|
|
1346
1399
|
* Method to check if an image is active (i.e. the current image).
|
|
@@ -1349,12 +1402,14 @@ class DotsComponent extends AccessibleComponent {
|
|
|
1349
1402
|
* @returns boolean true if is active (and input params are valid), false otherwise
|
|
1350
1403
|
*/
|
|
1351
1404
|
isActive(index) {
|
|
1352
|
-
|
|
1405
|
+
const currentImage = this.currentImage();
|
|
1406
|
+
const images = this.images();
|
|
1407
|
+
if (!currentImage || !images || images.length === 0) {
|
|
1353
1408
|
return false;
|
|
1354
1409
|
}
|
|
1355
1410
|
let imageIndex;
|
|
1356
1411
|
try {
|
|
1357
|
-
imageIndex = getIndex(
|
|
1412
|
+
imageIndex = getIndex(currentImage, images);
|
|
1358
1413
|
}
|
|
1359
1414
|
catch (err) {
|
|
1360
1415
|
console.error(`Internal error while trying to show the active 'dot'`, err);
|
|
@@ -1373,23 +1428,13 @@ class DotsComponent extends AccessibleComponent {
|
|
|
1373
1428
|
this.clickDot.emit(index);
|
|
1374
1429
|
}
|
|
1375
1430
|
}
|
|
1376
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: DotsComponent, deps:
|
|
1377
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.7", type: DotsComponent, isStandalone: true, selector: "ks-dots", inputs: { id: "id", currentImage: "currentImage", images: "images", dotsConfig: "dotsConfig" }, outputs: { clickDot: "clickDot" }, usesInheritance: true,
|
|
1431
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: DotsComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1432
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.7", type: DotsComponent, isStandalone: true, selector: "ks-dots", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: true, transformFunction: null }, currentImage: { classPropertyName: "currentImage", publicName: "currentImage", isSignal: true, isRequired: true, transformFunction: null }, images: { classPropertyName: "images", publicName: "images", isSignal: true, isRequired: true, transformFunction: null }, dotsConfig: { classPropertyName: "dotsConfig", publicName: "dotsConfig", isSignal: true, isRequired: true, transformFunction: null }, accessibilityConfig: { classPropertyName: "accessibilityConfig", publicName: "accessibilityConfig", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { clickDot: "clickDot" }, usesInheritance: true, ngImport: i0, template: "@let accessibilityConf = accessibilityConfig();\n@let dotsConf = dotsConfig();\n<nav class=\"dots-container\" [attr.aria-label]=\"accessibilityConf?.dotsContainerAriaLabel\"\n [title]=\"accessibilityConf?.dotsContainerTitle\">\n @if (!dotsConf || dotsConf?.visible) {\n @for (img of images(); let index = $index; track img.id) {\n <div class=\"inside dot\"\n [ngClass]=\"{'active': isActive(index)}\"\n [attr.aria-label]=\"accessibilityConf?.dotAriaLabel + ' ' + (index + 1)\"\n [tabIndex]=\"0\" role=\"navigation\"\n (click)=\"onDotEvent(index, $event)\" (keyup)=\"onDotEvent(index, $event)\"></div>\n }\n }\n</nav>\n", styles: [".dots-container{display:flex;flex-direction:row;justify-content:center;margin-bottom:30px}.dots-container>.dot{background:#fff;border-radius:5px;height:10px;margin-left:4px;margin-right:4px;width:10px;cursor:pointer;opacity:.5}.dots-container>.dot:hover{opacity:.9;transition:all .5s ease;transition-property:opacity}.dots-container>.dot.active{cursor:pointer;opacity:.9}@keyframes fadein-semi-visible05{0%{opacity:0}to{opacity:.5}}@keyframes fadein-semi-visible09{0%{opacity:0}to{opacity:.9}}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1378
1433
|
}
|
|
1379
1434
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: DotsComponent, decorators: [{
|
|
1380
1435
|
type: Component,
|
|
1381
|
-
args: [{ selector: 'ks-dots', changeDetection: ChangeDetectionStrategy.OnPush, imports: [NgClass], template: "<nav class=\"dots-container\" [attr.aria-label]=\"
|
|
1382
|
-
}]
|
|
1383
|
-
type: Input
|
|
1384
|
-
}], currentImage: [{
|
|
1385
|
-
type: Input
|
|
1386
|
-
}], images: [{
|
|
1387
|
-
type: Input
|
|
1388
|
-
}], dotsConfig: [{
|
|
1389
|
-
type: Input
|
|
1390
|
-
}], clickDot: [{
|
|
1391
|
-
type: Output
|
|
1392
|
-
}] } });
|
|
1436
|
+
args: [{ selector: 'ks-dots', changeDetection: ChangeDetectionStrategy.OnPush, imports: [NgClass], template: "@let accessibilityConf = accessibilityConfig();\n@let dotsConf = dotsConfig();\n<nav class=\"dots-container\" [attr.aria-label]=\"accessibilityConf?.dotsContainerAriaLabel\"\n [title]=\"accessibilityConf?.dotsContainerTitle\">\n @if (!dotsConf || dotsConf?.visible) {\n @for (img of images(); let index = $index; track img.id) {\n <div class=\"inside dot\"\n [ngClass]=\"{'active': isActive(index)}\"\n [attr.aria-label]=\"accessibilityConf?.dotAriaLabel + ' ' + (index + 1)\"\n [tabIndex]=\"0\" role=\"navigation\"\n (click)=\"onDotEvent(index, $event)\" (keyup)=\"onDotEvent(index, $event)\"></div>\n }\n }\n</nav>\n", styles: [".dots-container{display:flex;flex-direction:row;justify-content:center;margin-bottom:30px}.dots-container>.dot{background:#fff;border-radius:5px;height:10px;margin-left:4px;margin-right:4px;width:10px;cursor:pointer;opacity:.5}.dots-container>.dot:hover{opacity:.9;transition:all .5s ease;transition-property:opacity}.dots-container>.dot.active{cursor:pointer;opacity:.9}@keyframes fadein-semi-visible05{0%{opacity:0}to{opacity:.5}}@keyframes fadein-semi-visible09{0%{opacity:0}to{opacity:.9}}\n"] }]
|
|
1437
|
+
}] });
|
|
1393
1438
|
|
|
1394
1439
|
/*
|
|
1395
1440
|
The MIT License (MIT)
|
|
@@ -1422,14 +1467,8 @@ const DEFAULT_MAX_HEIGHT = '200px';
|
|
|
1422
1467
|
* Component with image previews for carousel
|
|
1423
1468
|
*/
|
|
1424
1469
|
class CarouselPreviewsComponent extends AccessibleComponent {
|
|
1425
|
-
constructor(
|
|
1426
|
-
// sanitizer is used only to sanitize style before add it to background property when legacyIE11Mode is enabled
|
|
1427
|
-
sanitizer, configService) {
|
|
1470
|
+
constructor() {
|
|
1428
1471
|
super();
|
|
1429
|
-
this.ref = ref;
|
|
1430
|
-
this.breakpointObserver = breakpointObserver;
|
|
1431
|
-
this.sanitizer = sanitizer;
|
|
1432
|
-
this.configService = configService;
|
|
1433
1472
|
/**
|
|
1434
1473
|
* Variable to change the max-width of the host component
|
|
1435
1474
|
*/
|
|
@@ -1439,9 +1478,23 @@ class CarouselPreviewsComponent extends AccessibleComponent {
|
|
|
1439
1478
|
*/
|
|
1440
1479
|
this.ariaLabel = `Carousel previews`;
|
|
1441
1480
|
/**
|
|
1442
|
-
*
|
|
1481
|
+
* Unique id (>=0) of the current instance of the carousel. This is useful when you are using
|
|
1482
|
+
* the carousel's feature to open modal gallery.
|
|
1483
|
+
*/
|
|
1484
|
+
this.id = input.required(...(ngDevMode ? [{ debugName: "id" }] : []));
|
|
1485
|
+
/**
|
|
1486
|
+
* Object of type `Image` that represent the visible image.
|
|
1487
|
+
*/
|
|
1488
|
+
this.currentImage = input.required(...(ngDevMode ? [{ debugName: "currentImage" }] : []));
|
|
1489
|
+
/**
|
|
1490
|
+
* Array of `Image` that represent the model of this library with all images,
|
|
1491
|
+
* thumbs and so on.
|
|
1492
|
+
*/
|
|
1493
|
+
this.images = input([], ...(ngDevMode ? [{ debugName: "images" }] : []));
|
|
1494
|
+
/**
|
|
1495
|
+
* Output to emit the clicked preview. The payload contains the `Image` associated to the clicked preview.
|
|
1443
1496
|
*/
|
|
1444
|
-
this.clickPreview =
|
|
1497
|
+
this.clickPreview = output();
|
|
1445
1498
|
/**
|
|
1446
1499
|
* Enum of type `Action` that represents a mouse click on a button.
|
|
1447
1500
|
* Declared here to be used inside the template.
|
|
@@ -1453,7 +1506,7 @@ class CarouselPreviewsComponent extends AccessibleComponent {
|
|
|
1453
1506
|
*/
|
|
1454
1507
|
this.keyboardAction = Action.KEYBOARD;
|
|
1455
1508
|
/**
|
|
1456
|
-
* Array of `
|
|
1509
|
+
* Array of `Image` exposed to the template. This field is initialized
|
|
1457
1510
|
* applying transformations, default values and so on to the input of the same type.
|
|
1458
1511
|
*/
|
|
1459
1512
|
this.previews = [];
|
|
@@ -1461,8 +1514,13 @@ class CarouselPreviewsComponent extends AccessibleComponent {
|
|
|
1461
1514
|
* Variable with the preview's maxHeight
|
|
1462
1515
|
*/
|
|
1463
1516
|
this.previewMaxHeight = DEFAULT_MAX_HEIGHT;
|
|
1517
|
+
this.ref = inject(ChangeDetectorRef);
|
|
1518
|
+
this.breakpointObserver = inject(BreakpointObserver);
|
|
1519
|
+
// sanitizer is used only to sanitize style before add it to background property when legacyIE11Mode is enabled
|
|
1520
|
+
this.sanitizer = inject(DomSanitizer);
|
|
1521
|
+
this.configService = inject(ConfigService);
|
|
1464
1522
|
// listen for width changes and update preview heights accordingly
|
|
1465
|
-
this.breakpointSubscription = breakpointObserver
|
|
1523
|
+
this.breakpointSubscription = this.breakpointObserver
|
|
1466
1524
|
.observe([Breakpoints.XSmall, Breakpoints.Small, Breakpoints.Medium, Breakpoints.Large, Breakpoints.XLarge])
|
|
1467
1525
|
.subscribe((result) => {
|
|
1468
1526
|
if (!this.previewConfig || !this.previewConfig.breakpoints) {
|
|
@@ -1507,7 +1565,7 @@ class CarouselPreviewsComponent extends AccessibleComponent {
|
|
|
1507
1565
|
* In particular, it's called only one time!!!
|
|
1508
1566
|
*/
|
|
1509
1567
|
ngOnInit() {
|
|
1510
|
-
const libConfig = this.configService.getConfig(this.id);
|
|
1568
|
+
const libConfig = this.configService.getConfig(this.id());
|
|
1511
1569
|
if (!libConfig) {
|
|
1512
1570
|
throw new Error('Internal library error - libConfig must be defined');
|
|
1513
1571
|
}
|
|
@@ -1523,7 +1581,7 @@ class CarouselPreviewsComponent extends AccessibleComponent {
|
|
|
1523
1581
|
}
|
|
1524
1582
|
this.previewMaxHeight = this.previewConfig.maxHeight;
|
|
1525
1583
|
// init previews based on currentImage and the full array of images
|
|
1526
|
-
this.initPreviews(this.currentImage, this.images);
|
|
1584
|
+
this.initPreviews(this.currentImage(), this.images());
|
|
1527
1585
|
// apply custom height based on responsive breakpoints
|
|
1528
1586
|
// This is required, because the breakpointSubscription is not triggered at creation,
|
|
1529
1587
|
// but only when the width changes
|
|
@@ -1550,14 +1608,15 @@ class CarouselPreviewsComponent extends AccessibleComponent {
|
|
|
1550
1608
|
}
|
|
1551
1609
|
/**
|
|
1552
1610
|
* Method to check if an image is active (i.e. a preview image).
|
|
1553
|
-
* @param preview
|
|
1611
|
+
* @param preview Image is an image to check if it's active or not
|
|
1554
1612
|
* @returns boolean true if is active, false otherwise
|
|
1555
1613
|
*/
|
|
1556
1614
|
isActive(preview) {
|
|
1557
|
-
|
|
1615
|
+
const currentImage = this.currentImage();
|
|
1616
|
+
if (!preview || !currentImage) {
|
|
1558
1617
|
return false;
|
|
1559
1618
|
}
|
|
1560
|
-
return preview.id ===
|
|
1619
|
+
return preview.id === currentImage.id;
|
|
1561
1620
|
}
|
|
1562
1621
|
/**
|
|
1563
1622
|
* Method ´ngOnChanges´ to update `previews` array.
|
|
@@ -1585,8 +1644,8 @@ class CarouselPreviewsComponent extends AccessibleComponent {
|
|
|
1585
1644
|
let prevIndex;
|
|
1586
1645
|
let currentIndex;
|
|
1587
1646
|
try {
|
|
1588
|
-
prevIndex = getIndex(prev, this.images);
|
|
1589
|
-
currentIndex = getIndex(current, this.images);
|
|
1647
|
+
prevIndex = getIndex(prev, this.images());
|
|
1648
|
+
currentIndex = getIndex(current, this.images());
|
|
1590
1649
|
}
|
|
1591
1650
|
catch (err) {
|
|
1592
1651
|
console.error('Cannot get previous and current image indexes in previews');
|
|
@@ -1594,17 +1653,18 @@ class CarouselPreviewsComponent extends AccessibleComponent {
|
|
|
1594
1653
|
}
|
|
1595
1654
|
// apply a formula to get a values to be used to decide if go next, return back or stay without doing anything
|
|
1596
1655
|
const calc = Math.floor((this.end - this.start) / 2) + this.start;
|
|
1597
|
-
|
|
1656
|
+
const images = this.images();
|
|
1657
|
+
if (prevIndex === images.length - 1 && currentIndex === 0) {
|
|
1598
1658
|
// first image
|
|
1599
1659
|
this.setBeginningIndexesPreviews();
|
|
1600
|
-
this.previews =
|
|
1660
|
+
this.previews = images.filter((img, i) => i >= this.start && i < this.end);
|
|
1601
1661
|
return;
|
|
1602
1662
|
}
|
|
1603
1663
|
// the same for the opposite case, when you navigate back from the fist image to go to the last one.
|
|
1604
|
-
if (prevIndex === 0 && currentIndex ===
|
|
1664
|
+
if (prevIndex === 0 && currentIndex === images.length - 1) {
|
|
1605
1665
|
// last image
|
|
1606
1666
|
this.setEndIndexesPreviews();
|
|
1607
|
-
this.previews =
|
|
1667
|
+
this.previews = images.filter((img, i) => i >= this.start && i < this.end);
|
|
1608
1668
|
return;
|
|
1609
1669
|
}
|
|
1610
1670
|
if (this.previewConfig && this.previewConfig.number % 2 === 0) {
|
|
@@ -1628,7 +1688,7 @@ class CarouselPreviewsComponent extends AccessibleComponent {
|
|
|
1628
1688
|
/**
|
|
1629
1689
|
* Method called by events from both keyboard and mouse on a preview.
|
|
1630
1690
|
* This will trigger the `clickpreview` output with the input preview as its payload.
|
|
1631
|
-
* @param preview
|
|
1691
|
+
* @param preview Image that triggered this method
|
|
1632
1692
|
* @param event KeyboardEvent | MouseEvent payload
|
|
1633
1693
|
* @param action Action that triggered this event (Action.NORMAL by default)
|
|
1634
1694
|
*/
|
|
@@ -1636,7 +1696,7 @@ class CarouselPreviewsComponent extends AccessibleComponent {
|
|
|
1636
1696
|
if (!this.previewConfig || !this.previewConfig.clickable) {
|
|
1637
1697
|
return;
|
|
1638
1698
|
}
|
|
1639
|
-
const clickedImageIndex = this.images.indexOf(preview);
|
|
1699
|
+
const clickedImageIndex = this.images().indexOf(preview);
|
|
1640
1700
|
const result = super.handleImageEvent(event);
|
|
1641
1701
|
if (result === NEXT) {
|
|
1642
1702
|
this.clickPreview.emit({ action, result: clickedImageIndex });
|
|
@@ -1717,8 +1777,8 @@ class CarouselPreviewsComponent extends AccessibleComponent {
|
|
|
1717
1777
|
/**
|
|
1718
1778
|
* Private method to init previews based on the currentImage and the full array of images.
|
|
1719
1779
|
* The current image in mandatory to show always the current preview (as highlighted).
|
|
1720
|
-
* @param currentImage
|
|
1721
|
-
* @param images
|
|
1780
|
+
* @param currentImage Image to decide how to show previews, because I always want to see the current image as highlighted
|
|
1781
|
+
* @param images Image[] is the array of all images.
|
|
1722
1782
|
*/
|
|
1723
1783
|
initPreviews(currentImage, images) {
|
|
1724
1784
|
let index;
|
|
@@ -1753,7 +1813,7 @@ class CarouselPreviewsComponent extends AccessibleComponent {
|
|
|
1753
1813
|
throw new Error('Internal library error - previewConfig and number must be defined');
|
|
1754
1814
|
}
|
|
1755
1815
|
this.start = 0;
|
|
1756
|
-
this.end = Math.min(this.previewConfig.number, this.images.length);
|
|
1816
|
+
this.end = Math.min(this.previewConfig.number, this.images().length);
|
|
1757
1817
|
}
|
|
1758
1818
|
/**
|
|
1759
1819
|
* Private method to init both `start` and `end` to the end.
|
|
@@ -1762,23 +1822,24 @@ class CarouselPreviewsComponent extends AccessibleComponent {
|
|
|
1762
1822
|
if (!this.previewConfig || this.previewConfig.number === undefined) {
|
|
1763
1823
|
throw new Error('Internal library error - previewConfig and number must be defined');
|
|
1764
1824
|
}
|
|
1765
|
-
this.start = this.images.length - 1 - (this.previewConfig.number - 1);
|
|
1766
|
-
this.end = this.images.length;
|
|
1825
|
+
this.start = this.images().length - 1 - (this.previewConfig.number - 1);
|
|
1826
|
+
this.end = this.images().length;
|
|
1767
1827
|
}
|
|
1768
1828
|
/**
|
|
1769
1829
|
* Private method to update the visible previews navigating to the right (next).
|
|
1770
1830
|
*/
|
|
1771
1831
|
next() {
|
|
1772
1832
|
// check if nextImage should be blocked
|
|
1773
|
-
|
|
1833
|
+
const images = this.images();
|
|
1834
|
+
if (this.isPreventSliding(images.length - 1)) {
|
|
1774
1835
|
return;
|
|
1775
1836
|
}
|
|
1776
|
-
if (this.end ===
|
|
1837
|
+
if (this.end === images.length) {
|
|
1777
1838
|
return;
|
|
1778
1839
|
}
|
|
1779
1840
|
this.start++;
|
|
1780
|
-
this.end = Math.min(this.end + 1,
|
|
1781
|
-
this.previews =
|
|
1841
|
+
this.end = Math.min(this.end + 1, images.length);
|
|
1842
|
+
this.previews = images.filter((img, i) => i >= this.start && i < this.end);
|
|
1782
1843
|
}
|
|
1783
1844
|
/**
|
|
1784
1845
|
* Private method to update the visible previews navigating to the left (previous).
|
|
@@ -1792,8 +1853,8 @@ class CarouselPreviewsComponent extends AccessibleComponent {
|
|
|
1792
1853
|
return;
|
|
1793
1854
|
}
|
|
1794
1855
|
this.start = Math.max(this.start - 1, 0);
|
|
1795
|
-
this.end = Math.min(this.end - 1, this.images.length);
|
|
1796
|
-
this.previews = this.images.filter((img, i) => i >= this.start && i < this.end);
|
|
1856
|
+
this.end = Math.min(this.end - 1, this.images().length);
|
|
1857
|
+
this.previews = this.images().filter((img, i) => i >= this.start && i < this.end);
|
|
1797
1858
|
}
|
|
1798
1859
|
/**
|
|
1799
1860
|
* Private method to block/permit sliding between previews.
|
|
@@ -1801,28 +1862,20 @@ class CarouselPreviewsComponent extends AccessibleComponent {
|
|
|
1801
1862
|
* @returns boolean if true block sliding, otherwise not
|
|
1802
1863
|
*/
|
|
1803
1864
|
isPreventSliding(boundaryIndex) {
|
|
1804
|
-
return getIndex(this.currentImage, this.images) === boundaryIndex;
|
|
1865
|
+
return getIndex(this.currentImage(), this.images()) === boundaryIndex;
|
|
1805
1866
|
}
|
|
1806
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: CarouselPreviewsComponent, deps: [
|
|
1807
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.7", type: CarouselPreviewsComponent, isStandalone: true, selector: "ks-carousel-previews", inputs: { id: "id", currentImage: "currentImage", images: "images" }, outputs: { clickPreview: "clickPreview" }, host: { properties: { "style.max-width": "this.hostMaxWidth", "attr.aria-label": "this.ariaLabel" } }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "@if (previewConfig?.visible) {\n <nav class=\"previews-container\"\n [attr.aria-label]=\"accessibilityConfig?.carouselPreviewsContainerAriaLabel\"\n [title]=\"accessibilityConfig?.carouselPreviewsContainerTitle\">\n\n <a class=\"nav-left\"\n [attr.aria-label]=\"accessibilityConfig?.carouselPreviewScrollPrevAriaLabel\"\n [tabIndex]=\"previewConfig?.arrows && start > 0 ? 0 : -1\" role=\"button\"\n (click)=\"onNavigationEvent('left', $event)\" (keyup)=\"onNavigationEvent('left', $event)\">\n <div class=\"inside {{previewConfig?.arrows && start > 0 ? 'left-arrow-preview-image' : 'empty-arrow-preview-image'}}\"\n aria-hidden=\"true\"\n [title]=\"accessibilityConfig?.carouselPreviewScrollPrevTitle\"></div>\n </a>\n\n <div class=\"preview-inner-container\">\n @for (preview of previews; track preview.id) {\n @if (preview?.modal?.img) {\n <img
|
|
1867
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: CarouselPreviewsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1868
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.7", type: CarouselPreviewsComponent, isStandalone: true, selector: "ks-carousel-previews", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: true, transformFunction: null }, currentImage: { classPropertyName: "currentImage", publicName: "currentImage", isSignal: true, isRequired: true, transformFunction: null }, images: { classPropertyName: "images", publicName: "images", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { clickPreview: "clickPreview" }, host: { properties: { "style.max-width": "this.hostMaxWidth", "attr.aria-label": "this.ariaLabel" } }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "@if (previewConfig?.visible) {\n <nav class=\"previews-container\"\n [attr.aria-label]=\"accessibilityConfig?.carouselPreviewsContainerAriaLabel\"\n [title]=\"accessibilityConfig?.carouselPreviewsContainerTitle\">\n\n <a class=\"nav-left\"\n [attr.aria-label]=\"accessibilityConfig?.carouselPreviewScrollPrevAriaLabel\"\n [tabIndex]=\"previewConfig?.arrows && start > 0 ? 0 : -1\" role=\"button\"\n (click)=\"onNavigationEvent('left', $event)\" (keyup)=\"onNavigationEvent('left', $event)\">\n <div class=\"inside {{previewConfig?.arrows && start > 0 ? 'left-arrow-preview-image' : 'empty-arrow-preview-image'}}\"\n aria-hidden=\"true\"\n [title]=\"accessibilityConfig?.carouselPreviewScrollPrevTitle\"></div>\n </a>\n\n <div class=\"preview-inner-container\">\n @for (preview of previews; track preview.id) {\n @if (preview?.modal?.img) {\n <img loading=\"{{preview.loading}}\"\n [attr.fetchpriority]=\"preview.fetchpriority\"\n class=\"inside preview-image{{isActive(preview) ? ' active' : ''}}{{!previewConfig?.clickable ? ' unclickable' : ''}}\"\n [src]=\"preview.plain?.img ? preview.plain?.img : preview.modal.img\"\n ksFallbackImage [fallbackImg]=\"preview.plain?.fallbackImg ? preview.plain?.fallbackImg : preview.modal.fallbackImg\"\n ksSize [sizeConfig]=\"{width: previewConfig?.width!,\n height: previewMaxHeight}\"\n [attr.aria-label]=\"getAriaLabel(preview)\"\n [title]=\"getTitle(preview)\"\n alt=\"{{getAlt(preview)}}\"\n [tabIndex]=\"0\" role=\"img\"\n (click)=\"onImageEvent(preview, $event, clickAction)\" (keyup)=\"onImageEvent(preview, $event, keyboardAction)\" />\n }\n }\n </div>\n\n <a class=\"nav-right\"\n [attr.aria-label]=\"accessibilityConfig?.carouselPreviewScrollNextAriaLabel\"\n [tabIndex]=\"previewConfig?.arrows && end < images().length ? 0 : -1\" role=\"button\"\n (click)=\"onNavigationEvent('right', $event)\" (keyup)=\"onNavigationEvent('right', $event)\">\n <div class=\"inside {{previewConfig?.arrows && end < images().length ? 'right-arrow-preview-image' : 'empty-arrow-preview-image'}}\"\n aria-hidden=\"true\"\n [title]=\"accessibilityConfig?.carouselPreviewScrollNextTitle\"></div>\n </a>\n </nav>\n}\n", styles: [":host{position:relative;margin-top:3px;margin-bottom:3px;width:100%}.previews-container{align-items:center;animation:fadein-semi-visible08 .8s;display:flex;flex-direction:row;justify-content:center;margin-bottom:0}.previews-container>.preview-inner-container{display:flex;flex-direction:row;justify-content:center;align-items:center;flex-wrap:nowrap;width:100%}.previews-container>.preview-inner-container>.preview-image{cursor:pointer;object-fit:cover}.previews-container>.preview-inner-container>.preview-image.unclickable{cursor:not-allowed}.previews-container .nav,.previews-container>.nav-right,.previews-container>.nav-left{position:absolute;top:calc(50% - 7px);color:#919191;z-index:1000;cursor:pointer;transition:all .5s}.previews-container .nav:hover,.previews-container>.nav-right:hover,.previews-container>.nav-left:hover{transform:scale(1.1)}.previews-container>.nav-left{margin-right:10px;left:10px}.previews-container>.nav-left>.left-arrow-preview-image{opacity:1}.previews-container>.nav-right{margin-left:10px;right:10px}.previews-container>.nav-right>.right-arrow-preview-image{opacity:1}\n", ".arrow-preview-image,.right-arrow-preview-image,.left-arrow-preview-image,.empty-arrow-preview-image{width:15px;height:15px;opacity:.5}.empty-arrow-preview-image{background:#000;opacity:0}.left-arrow-preview-image{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/PjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4PSIwcHgiIHk9IjBweCIgdmlld0JveD0iMCAwIDQ3Ny4xNzUgNDc3LjE3NSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgNDc3LjE3NSA0NzcuMTc1OyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIgd2lkdGg9IjUxMnB4IiBoZWlnaHQ9IjUxMnB4Ij48Zz48cGF0aCBkPSJNMTQ1LjE4OCwyMzguNTc1bDIxNS41LTIxNS41YzUuMy01LjMsNS4zLTEzLjgsMC0xOS4xcy0xMy44LTUuMy0xOS4xLDBsLTIyNS4xLDIyNS4xYy01LjMsNS4zLTUuMywxMy44LDAsMTkuMWwyMjUuMSwyMjUgICBjMi42LDIuNiw2LjEsNCw5LjUsNHM2LjktMS4zLDkuNS00YzUuMy01LjMsNS4zLTEzLjgsMC0xOS4xTDE0NS4xODgsMjM4LjU3NXoiIGZpbGw9IiNGRkZGRkYiLz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PC9zdmc+);background-size:15px;transition:all .5s}.left-arrow-preview-image:hover{transform:scale(1.2)}.right-arrow-preview-image{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/PjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4PSIwcHgiIHk9IjBweCIgdmlld0JveD0iMCAwIDQ3Ny4xNzUgNDc3LjE3NSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgNDc3LjE3NSA0NzcuMTc1OyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIgd2lkdGg9IjUxMnB4IiBoZWlnaHQ9IjUxMnB4Ij48Zz48cGF0aCBkPSJNMzYwLjczMSwyMjkuMDc1bC0yMjUuMS0yMjUuMWMtNS4zLTUuMy0xMy44LTUuMy0xOS4xLDBzLTUuMywxMy44LDAsMTkuMWwyMTUuNSwyMTUuNWwtMjE1LjUsMjE1LjUgICBjLTUuMyw1LjMtNS4zLDEzLjgsMCwxOS4xYzIuNiwyLjYsNi4xLDQsOS41LDRjMy40LDAsNi45LTEuMyw5LjUtNGwyMjUuMS0yMjUuMUMzNjUuOTMxLDI0Mi44NzUsMzY1LjkzMSwyMzQuMjc1LDM2MC43MzEsMjI5LjA3NXogICAiIGZpbGw9IiNGRkZGRkYiLz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PC9zdmc+);background-size:15px;transition:all .5s}.right-arrow-preview-image:hover{transform:scale(1.2)}\n"], dependencies: [{ kind: "directive", type: FallbackImageDirective, selector: "[ksFallbackImage]", inputs: ["fallbackImg"], outputs: ["fallbackApplied"] }, { kind: "directive", type: SizeDirective, selector: "[ksSize]", inputs: ["sizeConfig"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1808
1869
|
}
|
|
1809
1870
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: CarouselPreviewsComponent, decorators: [{
|
|
1810
1871
|
type: Component,
|
|
1811
|
-
args: [{ selector: 'ks-carousel-previews', changeDetection: ChangeDetectionStrategy.OnPush, imports: [FallbackImageDirective, SizeDirective], template: "@if (previewConfig?.visible) {\n <nav class=\"previews-container\"\n [attr.aria-label]=\"accessibilityConfig?.carouselPreviewsContainerAriaLabel\"\n [title]=\"accessibilityConfig?.carouselPreviewsContainerTitle\">\n\n <a class=\"nav-left\"\n [attr.aria-label]=\"accessibilityConfig?.carouselPreviewScrollPrevAriaLabel\"\n [tabIndex]=\"previewConfig?.arrows && start > 0 ? 0 : -1\" role=\"button\"\n (click)=\"onNavigationEvent('left', $event)\" (keyup)=\"onNavigationEvent('left', $event)\">\n <div class=\"inside {{previewConfig?.arrows && start > 0 ? 'left-arrow-preview-image' : 'empty-arrow-preview-image'}}\"\n aria-hidden=\"true\"\n [title]=\"accessibilityConfig?.carouselPreviewScrollPrevTitle\"></div>\n </a>\n\n <div class=\"preview-inner-container\">\n @for (preview of previews; track preview.id) {\n @if (preview?.modal?.img) {\n <img
|
|
1812
|
-
}], ctorParameters: () => [
|
|
1872
|
+
args: [{ selector: 'ks-carousel-previews', changeDetection: ChangeDetectionStrategy.OnPush, imports: [FallbackImageDirective, SizeDirective], template: "@if (previewConfig?.visible) {\n <nav class=\"previews-container\"\n [attr.aria-label]=\"accessibilityConfig?.carouselPreviewsContainerAriaLabel\"\n [title]=\"accessibilityConfig?.carouselPreviewsContainerTitle\">\n\n <a class=\"nav-left\"\n [attr.aria-label]=\"accessibilityConfig?.carouselPreviewScrollPrevAriaLabel\"\n [tabIndex]=\"previewConfig?.arrows && start > 0 ? 0 : -1\" role=\"button\"\n (click)=\"onNavigationEvent('left', $event)\" (keyup)=\"onNavigationEvent('left', $event)\">\n <div class=\"inside {{previewConfig?.arrows && start > 0 ? 'left-arrow-preview-image' : 'empty-arrow-preview-image'}}\"\n aria-hidden=\"true\"\n [title]=\"accessibilityConfig?.carouselPreviewScrollPrevTitle\"></div>\n </a>\n\n <div class=\"preview-inner-container\">\n @for (preview of previews; track preview.id) {\n @if (preview?.modal?.img) {\n <img loading=\"{{preview.loading}}\"\n [attr.fetchpriority]=\"preview.fetchpriority\"\n class=\"inside preview-image{{isActive(preview) ? ' active' : ''}}{{!previewConfig?.clickable ? ' unclickable' : ''}}\"\n [src]=\"preview.plain?.img ? preview.plain?.img : preview.modal.img\"\n ksFallbackImage [fallbackImg]=\"preview.plain?.fallbackImg ? preview.plain?.fallbackImg : preview.modal.fallbackImg\"\n ksSize [sizeConfig]=\"{width: previewConfig?.width!,\n height: previewMaxHeight}\"\n [attr.aria-label]=\"getAriaLabel(preview)\"\n [title]=\"getTitle(preview)\"\n alt=\"{{getAlt(preview)}}\"\n [tabIndex]=\"0\" role=\"img\"\n (click)=\"onImageEvent(preview, $event, clickAction)\" (keyup)=\"onImageEvent(preview, $event, keyboardAction)\" />\n }\n }\n </div>\n\n <a class=\"nav-right\"\n [attr.aria-label]=\"accessibilityConfig?.carouselPreviewScrollNextAriaLabel\"\n [tabIndex]=\"previewConfig?.arrows && end < images().length ? 0 : -1\" role=\"button\"\n (click)=\"onNavigationEvent('right', $event)\" (keyup)=\"onNavigationEvent('right', $event)\">\n <div class=\"inside {{previewConfig?.arrows && end < images().length ? 'right-arrow-preview-image' : 'empty-arrow-preview-image'}}\"\n aria-hidden=\"true\"\n [title]=\"accessibilityConfig?.carouselPreviewScrollNextTitle\"></div>\n </a>\n </nav>\n}\n", styles: [":host{position:relative;margin-top:3px;margin-bottom:3px;width:100%}.previews-container{align-items:center;animation:fadein-semi-visible08 .8s;display:flex;flex-direction:row;justify-content:center;margin-bottom:0}.previews-container>.preview-inner-container{display:flex;flex-direction:row;justify-content:center;align-items:center;flex-wrap:nowrap;width:100%}.previews-container>.preview-inner-container>.preview-image{cursor:pointer;object-fit:cover}.previews-container>.preview-inner-container>.preview-image.unclickable{cursor:not-allowed}.previews-container .nav,.previews-container>.nav-right,.previews-container>.nav-left{position:absolute;top:calc(50% - 7px);color:#919191;z-index:1000;cursor:pointer;transition:all .5s}.previews-container .nav:hover,.previews-container>.nav-right:hover,.previews-container>.nav-left:hover{transform:scale(1.1)}.previews-container>.nav-left{margin-right:10px;left:10px}.previews-container>.nav-left>.left-arrow-preview-image{opacity:1}.previews-container>.nav-right{margin-left:10px;right:10px}.previews-container>.nav-right>.right-arrow-preview-image{opacity:1}\n", ".arrow-preview-image,.right-arrow-preview-image,.left-arrow-preview-image,.empty-arrow-preview-image{width:15px;height:15px;opacity:.5}.empty-arrow-preview-image{background:#000;opacity:0}.left-arrow-preview-image{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/PjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4PSIwcHgiIHk9IjBweCIgdmlld0JveD0iMCAwIDQ3Ny4xNzUgNDc3LjE3NSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgNDc3LjE3NSA0NzcuMTc1OyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIgd2lkdGg9IjUxMnB4IiBoZWlnaHQ9IjUxMnB4Ij48Zz48cGF0aCBkPSJNMTQ1LjE4OCwyMzguNTc1bDIxNS41LTIxNS41YzUuMy01LjMsNS4zLTEzLjgsMC0xOS4xcy0xMy44LTUuMy0xOS4xLDBsLTIyNS4xLDIyNS4xYy01LjMsNS4zLTUuMywxMy44LDAsMTkuMWwyMjUuMSwyMjUgICBjMi42LDIuNiw2LjEsNCw5LjUsNHM2LjktMS4zLDkuNS00YzUuMy01LjMsNS4zLTEzLjgsMC0xOS4xTDE0NS4xODgsMjM4LjU3NXoiIGZpbGw9IiNGRkZGRkYiLz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PC9zdmc+);background-size:15px;transition:all .5s}.left-arrow-preview-image:hover{transform:scale(1.2)}.right-arrow-preview-image{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/PjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4PSIwcHgiIHk9IjBweCIgdmlld0JveD0iMCAwIDQ3Ny4xNzUgNDc3LjE3NSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgNDc3LjE3NSA0NzcuMTc1OyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIgd2lkdGg9IjUxMnB4IiBoZWlnaHQ9IjUxMnB4Ij48Zz48cGF0aCBkPSJNMzYwLjczMSwyMjkuMDc1bC0yMjUuMS0yMjUuMWMtNS4zLTUuMy0xMy44LTUuMy0xOS4xLDBzLTUuMywxMy44LDAsMTkuMWwyMTUuNSwyMTUuNWwtMjE1LjUsMjE1LjUgICBjLTUuMyw1LjMtNS4zLDEzLjgsMCwxOS4xYzIuNiwyLjYsNi4xLDQsOS41LDRjMy40LDAsNi45LTEuMyw5LjUtNGwyMjUuMS0yMjUuMUMzNjUuOTMxLDI0Mi44NzUsMzY1LjkzMSwyMzQuMjc1LDM2MC43MzEsMjI5LjA3NXogICAiIGZpbGw9IiNGRkZGRkYiLz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PC9zdmc+);background-size:15px;transition:all .5s}.right-arrow-preview-image:hover{transform:scale(1.2)}\n"] }]
|
|
1873
|
+
}], ctorParameters: () => [], propDecorators: { hostMaxWidth: [{
|
|
1813
1874
|
type: HostBinding,
|
|
1814
1875
|
args: ['style.max-width']
|
|
1815
1876
|
}], ariaLabel: [{
|
|
1816
1877
|
type: HostBinding,
|
|
1817
1878
|
args: ['attr.aria-label']
|
|
1818
|
-
}], id: [{
|
|
1819
|
-
type: Input
|
|
1820
|
-
}], currentImage: [{
|
|
1821
|
-
type: Input
|
|
1822
|
-
}], images: [{
|
|
1823
|
-
type: Input
|
|
1824
|
-
}], clickPreview: [{
|
|
1825
|
-
type: Output
|
|
1826
1879
|
}] } });
|
|
1827
1880
|
|
|
1828
1881
|
/*
|
|
@@ -1848,331 +1901,72 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImpor
|
|
|
1848
1901
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
1849
1902
|
SOFTWARE.
|
|
1850
1903
|
*/
|
|
1904
|
+
// The idea to create a carousel with two Subjects came from ng-bootstrap
|
|
1905
|
+
// So a big thank you to the ng-bootstrap team for the interesting implementation that I used here with some customizations.
|
|
1851
1906
|
/**
|
|
1852
|
-
*
|
|
1853
|
-
* It is returned by the open method.
|
|
1907
|
+
* Component with configurable inline/plain carousel.
|
|
1854
1908
|
*/
|
|
1855
|
-
class
|
|
1856
|
-
constructor(overlayRef) {
|
|
1857
|
-
this.overlayRef = overlayRef;
|
|
1858
|
-
this.close = new Subject();
|
|
1859
|
-
this.close$ = this.close.asObservable();
|
|
1860
|
-
this.show = new Subject();
|
|
1861
|
-
this.show$ = this.show.asObservable();
|
|
1862
|
-
this.firstImage = new Subject();
|
|
1863
|
-
this.firstImage$ = this.firstImage.asObservable();
|
|
1864
|
-
this.lastImage = new Subject();
|
|
1865
|
-
this.lastImage$ = this.lastImage.asObservable();
|
|
1866
|
-
this.hasData = new Subject();
|
|
1867
|
-
this.hasData$ = this.hasData.asObservable();
|
|
1868
|
-
this.buttonBeforeHook = new Subject();
|
|
1869
|
-
this.buttonBeforeHook$ = this.buttonBeforeHook.asObservable();
|
|
1870
|
-
this.buttonAfterHook = new Subject();
|
|
1871
|
-
this.buttonAfterHook$ = this.buttonAfterHook.asObservable();
|
|
1872
|
-
}
|
|
1873
|
-
/**
|
|
1874
|
-
* Close modal dialog, disposing the Overlay.
|
|
1875
|
-
*/
|
|
1876
|
-
closeModal() {
|
|
1877
|
-
this.overlayRef.dispose();
|
|
1878
|
-
}
|
|
1879
|
-
/**
|
|
1880
|
-
* Method to emit close event.
|
|
1881
|
-
* @param event ImageModalEvent event payload
|
|
1882
|
-
*/
|
|
1883
|
-
emitClose(event) {
|
|
1884
|
-
this.close.next(event);
|
|
1885
|
-
}
|
|
1886
|
-
/**
|
|
1887
|
-
* Method to emit show event.
|
|
1888
|
-
* @param event ImageModalEvent event payload
|
|
1889
|
-
*/
|
|
1890
|
-
emitShow(event) {
|
|
1891
|
-
this.show.next(event);
|
|
1892
|
-
}
|
|
1893
|
-
/**
|
|
1894
|
-
* Method to emit firstImage event.
|
|
1895
|
-
* @param event ImageModalEvent event payload
|
|
1896
|
-
*/
|
|
1897
|
-
emitFirstImage(event) {
|
|
1898
|
-
this.firstImage.next(event);
|
|
1899
|
-
}
|
|
1900
|
-
/**
|
|
1901
|
-
* Method to emit lastImage event.
|
|
1902
|
-
* @param event ImageModalEvent event payload
|
|
1903
|
-
*/
|
|
1904
|
-
emitLastImage(event) {
|
|
1905
|
-
this.lastImage.next(event);
|
|
1906
|
-
}
|
|
1907
|
-
/**
|
|
1908
|
-
* Method to emit hasData event.
|
|
1909
|
-
* @param event ImageModalEvent event payload
|
|
1910
|
-
*/
|
|
1911
|
-
emitHasData(event) {
|
|
1912
|
-
this.hasData.next(event);
|
|
1913
|
-
}
|
|
1914
|
-
/**
|
|
1915
|
-
* Method to emit buttonBeforeHook event.
|
|
1916
|
-
* @param event ImageModalEvent event payload
|
|
1917
|
-
*/
|
|
1918
|
-
emitButtonBeforeHook(event) {
|
|
1919
|
-
this.buttonBeforeHook.next(event);
|
|
1920
|
-
}
|
|
1909
|
+
class CarouselComponent extends AccessibleComponent {
|
|
1921
1910
|
/**
|
|
1922
|
-
*
|
|
1923
|
-
* @param event ImageModalEvent event payload
|
|
1911
|
+
* Listener to stop the gallery when the mouse pointer is over the current image.
|
|
1924
1912
|
*/
|
|
1925
|
-
|
|
1926
|
-
this.
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
const
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
this.
|
|
1938
|
-
this.configService = configService;
|
|
1939
|
-
this.updateImages = new Subject();
|
|
1940
|
-
this.updateImages$ = this.updateImages.asObservable();
|
|
1941
|
-
this.triggerAttachToOverlay = new EventEmitter();
|
|
1913
|
+
onMouseEnter() {
|
|
1914
|
+
const id = this.id();
|
|
1915
|
+
if (id === null || id === undefined) {
|
|
1916
|
+
throw new Error('Internal library error - id must be defined');
|
|
1917
|
+
}
|
|
1918
|
+
const libConfig = this.configService.getConfig(id);
|
|
1919
|
+
if (!libConfig) {
|
|
1920
|
+
throw new Error('Internal library error - libConfig must be defined');
|
|
1921
|
+
}
|
|
1922
|
+
if (!libConfig.carouselPlayConfig || !libConfig.carouselPlayConfig.pauseOnHover) {
|
|
1923
|
+
return;
|
|
1924
|
+
}
|
|
1925
|
+
this.stopCarousel();
|
|
1942
1926
|
}
|
|
1943
1927
|
/**
|
|
1944
|
-
*
|
|
1945
|
-
* @param config ModalGalleryConfig that contains: id, array of images, current image and optionally the configuration object
|
|
1946
|
-
* @return ModalGalleryRef | undefined is the object used to listen for events.
|
|
1928
|
+
* Listener to play the gallery when the mouse pointer leave the current image.
|
|
1947
1929
|
*/
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
this.dialogRef.closeModal();
|
|
1962
|
-
}
|
|
1963
|
-
});
|
|
1964
|
-
return this.dialogRef;
|
|
1930
|
+
onMouseLeave() {
|
|
1931
|
+
const id = this.id();
|
|
1932
|
+
if (id === null || id === undefined) {
|
|
1933
|
+
throw new Error('Internal library error - id must be defined');
|
|
1934
|
+
}
|
|
1935
|
+
const libConfig = this.configService.getConfig(id);
|
|
1936
|
+
if (!libConfig) {
|
|
1937
|
+
throw new Error('Internal library error - libConfig must be defined');
|
|
1938
|
+
}
|
|
1939
|
+
if (!libConfig.carouselPlayConfig || !libConfig.carouselPlayConfig.pauseOnHover || !libConfig.carouselPlayConfig.autoPlay) {
|
|
1940
|
+
return;
|
|
1941
|
+
}
|
|
1942
|
+
this.playCarousel();
|
|
1965
1943
|
}
|
|
1966
1944
|
/**
|
|
1967
|
-
*
|
|
1968
|
-
* @param id Unique identifier of the modal gallery
|
|
1969
|
-
* @param clickOutside boolean is true if closed clicking on the modal backdrop, false otherwise.
|
|
1945
|
+
* Listener to navigate carousel images with keyboard (left).
|
|
1970
1946
|
*/
|
|
1971
|
-
|
|
1947
|
+
onKeyDownLeft() {
|
|
1948
|
+
const id = this.id();
|
|
1949
|
+
if (id === null || id === undefined) {
|
|
1950
|
+
throw new Error('Internal library error - id must be defined');
|
|
1951
|
+
}
|
|
1972
1952
|
const libConfig = this.configService.getConfig(id);
|
|
1973
|
-
if (
|
|
1974
|
-
|
|
1975
|
-
this.dialogRef.closeModal();
|
|
1976
|
-
}
|
|
1953
|
+
if (!libConfig) {
|
|
1954
|
+
throw new Error('Internal library error - libConfig must be defined');
|
|
1977
1955
|
}
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
this.dialogRef.closeModal();
|
|
1981
|
-
}
|
|
1956
|
+
if (!libConfig.carouselConfig || !libConfig.carouselConfig.keyboardEnable) {
|
|
1957
|
+
return;
|
|
1982
1958
|
}
|
|
1983
|
-
|
|
1984
|
-
/**
|
|
1985
|
-
* Method to update images array.
|
|
1986
|
-
* @param images Image[] updated array of images
|
|
1987
|
-
*/
|
|
1988
|
-
updateModalImages(images) {
|
|
1989
|
-
this.updateImages.next(images);
|
|
1990
|
-
}
|
|
1991
|
-
/**
|
|
1992
|
-
* Method to emit close event.
|
|
1993
|
-
* @param event ImageModalEvent is the event payload
|
|
1994
|
-
*/
|
|
1995
|
-
emitClose(event) {
|
|
1996
|
-
if (!this.dialogRef) {
|
|
1997
|
-
return;
|
|
1998
|
-
}
|
|
1999
|
-
this.dialogRef.emitClose(event);
|
|
2000
|
-
}
|
|
2001
|
-
/**
|
|
2002
|
-
* Method to emit show event.
|
|
2003
|
-
* @param event ImageModalEvent is the event payload
|
|
2004
|
-
*/
|
|
2005
|
-
emitShow(event) {
|
|
2006
|
-
if (!this.dialogRef) {
|
|
2007
|
-
return;
|
|
2008
|
-
}
|
|
2009
|
-
this.dialogRef.emitShow(event);
|
|
2010
|
-
}
|
|
2011
|
-
/**
|
|
2012
|
-
* Method to emit firstImage event.
|
|
2013
|
-
* @param event ImageModalEvent is the event payload
|
|
2014
|
-
*/
|
|
2015
|
-
emitFirstImage(event) {
|
|
2016
|
-
if (!this.dialogRef) {
|
|
2017
|
-
return;
|
|
2018
|
-
}
|
|
2019
|
-
this.dialogRef.emitFirstImage(event);
|
|
2020
|
-
}
|
|
2021
|
-
/**
|
|
2022
|
-
* Method to emit lastImage event.
|
|
2023
|
-
* @param event ImageModalEvent is the event payload
|
|
2024
|
-
*/
|
|
2025
|
-
emitLastImage(event) {
|
|
2026
|
-
if (!this.dialogRef) {
|
|
2027
|
-
return;
|
|
2028
|
-
}
|
|
2029
|
-
this.dialogRef.emitLastImage(event);
|
|
2030
|
-
}
|
|
2031
|
-
/**
|
|
2032
|
-
* Method to emit hasData event.
|
|
2033
|
-
* @param event ImageModalEvent is the event payload
|
|
2034
|
-
*/
|
|
2035
|
-
emitHasData(event) {
|
|
2036
|
-
if (!this.dialogRef) {
|
|
2037
|
-
return;
|
|
2038
|
-
}
|
|
2039
|
-
this.dialogRef.emitHasData(event);
|
|
2040
|
-
}
|
|
2041
|
-
/**
|
|
2042
|
-
* Method to emit buttonBeforeHook event.
|
|
2043
|
-
* @param event ButtonEvent is the event payload
|
|
2044
|
-
*/
|
|
2045
|
-
emitButtonBeforeHook(event) {
|
|
2046
|
-
if (!this.dialogRef) {
|
|
2047
|
-
return;
|
|
2048
|
-
}
|
|
2049
|
-
this.dialogRef.emitButtonBeforeHook(event);
|
|
2050
|
-
}
|
|
2051
|
-
/**
|
|
2052
|
-
* Method to emit buttonAfterHook event.
|
|
2053
|
-
* @param event ButtonEvent is the event payload
|
|
2054
|
-
*/
|
|
2055
|
-
emitButtonAfterHook(event) {
|
|
2056
|
-
if (!this.dialogRef) {
|
|
2057
|
-
return;
|
|
2058
|
-
}
|
|
2059
|
-
this.dialogRef.emitButtonAfterHook(event);
|
|
2060
|
-
}
|
|
2061
|
-
/**
|
|
2062
|
-
* Private method to create an Overlay using Angular CDK APIs
|
|
2063
|
-
* @private
|
|
2064
|
-
*/
|
|
2065
|
-
createOverlay() {
|
|
2066
|
-
const overlayConfig = this.getOverlayConfig();
|
|
2067
|
-
return this.overlay.create(overlayConfig);
|
|
2068
|
-
}
|
|
2069
|
-
/**
|
|
2070
|
-
* Private method to create an OverlayConfig instance
|
|
2071
|
-
* @private
|
|
2072
|
-
*/
|
|
2073
|
-
getOverlayConfig() {
|
|
2074
|
-
const positionStrategy = this.overlay.position().global().centerHorizontally().centerVertically();
|
|
2075
|
-
return new OverlayConfig({
|
|
2076
|
-
hasBackdrop: DEFAULT_DIALOG_CONFIG.hasBackdrop,
|
|
2077
|
-
backdropClass: DEFAULT_DIALOG_CONFIG.backdropClass,
|
|
2078
|
-
panelClass: DEFAULT_DIALOG_CONFIG.panelClass,
|
|
2079
|
-
scrollStrategy: this.overlay.scrollStrategies.block(),
|
|
2080
|
-
positionStrategy
|
|
2081
|
-
});
|
|
2082
|
-
}
|
|
2083
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: ModalGalleryService, deps: [{ token: i1$1.Overlay }, { token: ConfigService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2084
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: ModalGalleryService, providedIn: 'root' }); }
|
|
2085
|
-
}
|
|
2086
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: ModalGalleryService, decorators: [{
|
|
2087
|
-
type: Injectable,
|
|
2088
|
-
args: [{ providedIn: 'root' }]
|
|
2089
|
-
}], ctorParameters: () => [{ type: i1$1.Overlay }, { type: ConfigService }] });
|
|
2090
|
-
|
|
2091
|
-
/*
|
|
2092
|
-
The MIT License (MIT)
|
|
2093
|
-
|
|
2094
|
-
Copyright (c) 2017-2025 Stefano Cappa (Ks89)
|
|
2095
|
-
|
|
2096
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
2097
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
2098
|
-
in the Software without restriction, including without limitation the rights
|
|
2099
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
2100
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
2101
|
-
furnished to do so, subject to the following conditions:
|
|
2102
|
-
|
|
2103
|
-
The above copyright notice and this permission notice shall be included in all
|
|
2104
|
-
copies or substantial portions of the Software.
|
|
2105
|
-
|
|
2106
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
2107
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
2108
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL THE
|
|
2109
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
2110
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
2111
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
2112
|
-
SOFTWARE.
|
|
2113
|
-
*/
|
|
2114
|
-
// The idea to create a carousel with two Subjects came from ng-bootstrap
|
|
2115
|
-
// So a big thank you to the ng-bootstrap team for the interesting implementation that I used here with some customizations.
|
|
2116
|
-
/**
|
|
2117
|
-
* Component with configurable inline/plain carousel.
|
|
2118
|
-
*/
|
|
2119
|
-
class CarouselComponent extends AccessibleComponent {
|
|
2120
|
-
/**
|
|
2121
|
-
* Listener to stop the gallery when the mouse pointer is over the current image.
|
|
2122
|
-
*/
|
|
2123
|
-
onMouseEnter() {
|
|
2124
|
-
if (this.id === null || this.id === undefined) {
|
|
2125
|
-
throw new Error('Internal library error - id must be defined');
|
|
2126
|
-
}
|
|
2127
|
-
const libConfig = this.configService.getConfig(this.id);
|
|
2128
|
-
if (!libConfig) {
|
|
2129
|
-
throw new Error('Internal library error - libConfig must be defined');
|
|
2130
|
-
}
|
|
2131
|
-
if (!libConfig.carouselPlayConfig || !libConfig.carouselPlayConfig.pauseOnHover) {
|
|
2132
|
-
return;
|
|
2133
|
-
}
|
|
2134
|
-
this.stopCarousel();
|
|
2135
|
-
}
|
|
2136
|
-
/**
|
|
2137
|
-
* Listener to play the gallery when the mouse pointer leave the current image.
|
|
2138
|
-
*/
|
|
2139
|
-
onMouseLeave() {
|
|
2140
|
-
if (this.id === null || this.id === undefined) {
|
|
2141
|
-
throw new Error('Internal library error - id must be defined');
|
|
2142
|
-
}
|
|
2143
|
-
const libConfig = this.configService.getConfig(this.id);
|
|
2144
|
-
if (!libConfig) {
|
|
2145
|
-
throw new Error('Internal library error - libConfig must be defined');
|
|
2146
|
-
}
|
|
2147
|
-
if (!libConfig.carouselPlayConfig || !libConfig.carouselPlayConfig.pauseOnHover || !libConfig.carouselPlayConfig.autoPlay) {
|
|
2148
|
-
return;
|
|
2149
|
-
}
|
|
2150
|
-
this.playCarousel();
|
|
2151
|
-
}
|
|
2152
|
-
/**
|
|
2153
|
-
* Listener to navigate carousel images with keyboard (left).
|
|
2154
|
-
*/
|
|
2155
|
-
onKeyDownLeft() {
|
|
2156
|
-
if (this.id === null || this.id === undefined) {
|
|
2157
|
-
throw new Error('Internal library error - id must be defined');
|
|
2158
|
-
}
|
|
2159
|
-
const libConfig = this.configService.getConfig(this.id);
|
|
2160
|
-
if (!libConfig) {
|
|
2161
|
-
throw new Error('Internal library error - libConfig must be defined');
|
|
2162
|
-
}
|
|
2163
|
-
if (!libConfig.carouselConfig || !libConfig.carouselConfig.keyboardEnable) {
|
|
2164
|
-
return;
|
|
2165
|
-
}
|
|
2166
|
-
this.prevImage();
|
|
1959
|
+
this.prevImage();
|
|
2167
1960
|
}
|
|
2168
1961
|
/**
|
|
2169
1962
|
* Listener to navigate carousel images with keyboard (right).
|
|
2170
1963
|
*/
|
|
2171
1964
|
onKeyDownLRight() {
|
|
2172
|
-
|
|
1965
|
+
const id = this.id();
|
|
1966
|
+
if (id === null || id === undefined) {
|
|
2173
1967
|
throw new Error('Internal library error - id must be defined');
|
|
2174
1968
|
}
|
|
2175
|
-
const libConfig = this.configService.getConfig(
|
|
1969
|
+
const libConfig = this.configService.getConfig(id);
|
|
2176
1970
|
if (!libConfig) {
|
|
2177
1971
|
throw new Error('Internal library error - libConfig must be defined');
|
|
2178
1972
|
}
|
|
@@ -2181,40 +1975,45 @@ class CarouselComponent extends AccessibleComponent {
|
|
|
2181
1975
|
}
|
|
2182
1976
|
this.nextImage();
|
|
2183
1977
|
}
|
|
2184
|
-
constructor(
|
|
2185
|
-
// tslint:disable-next-line:no-any
|
|
2186
|
-
platformId, ngZone, modalGalleryService, configService, ref) {
|
|
1978
|
+
constructor(ngZone, configService, ref) {
|
|
2187
1979
|
super();
|
|
2188
|
-
this.platformId = platformId;
|
|
2189
1980
|
this.ngZone = ngZone;
|
|
2190
|
-
this.modalGalleryService = modalGalleryService;
|
|
2191
1981
|
this.configService = configService;
|
|
2192
1982
|
this.ref = ref;
|
|
2193
1983
|
/**
|
|
2194
1984
|
* Attribute to set ariaLabel of the host component
|
|
2195
1985
|
*/
|
|
2196
1986
|
this.ariaLabel = `Carousel`;
|
|
1987
|
+
/**
|
|
1988
|
+
* Unique id (>=0) of the current instance of the carousel. This is useful when you are using
|
|
1989
|
+
* the carousel's feature to open modal gallery.
|
|
1990
|
+
*/
|
|
1991
|
+
this.id = input.required(...(ngDevMode ? [{ debugName: "id" }] : []));
|
|
2197
1992
|
/**
|
|
2198
1993
|
* Array of `InternalLibImage` that represent the model of this library with all images,
|
|
2199
1994
|
* thumbs and so on.
|
|
2200
1995
|
*/
|
|
2201
|
-
this.images = [];
|
|
1996
|
+
this.images = input([], ...(ngDevMode ? [{ debugName: "images" }] : []));
|
|
1997
|
+
/**
|
|
1998
|
+
* CarouselLibConfig object to configure carousel.
|
|
1999
|
+
*/
|
|
2000
|
+
this.config = input(...(ngDevMode ? [undefined, { debugName: "config" }] : []));
|
|
2202
2001
|
/**
|
|
2203
2002
|
* Output to emit an event when an image is clicked.
|
|
2204
2003
|
*/
|
|
2205
|
-
this.clickImage =
|
|
2004
|
+
this.clickImage = output();
|
|
2206
2005
|
/**
|
|
2207
2006
|
* Output to emit an event when current image is changed.
|
|
2208
2007
|
*/
|
|
2209
|
-
this.changeImage =
|
|
2008
|
+
this.changeImage = output();
|
|
2210
2009
|
/**
|
|
2211
2010
|
* Output to emit an event when the current image is the first one.
|
|
2212
2011
|
*/
|
|
2213
|
-
this.firstImage =
|
|
2012
|
+
this.firstImage = output();
|
|
2214
2013
|
/**
|
|
2215
2014
|
* Output to emit an event when the current image is the last one.
|
|
2216
2015
|
*/
|
|
2217
|
-
this.lastImage =
|
|
2016
|
+
this.lastImage = output();
|
|
2218
2017
|
/**
|
|
2219
2018
|
* Enum of type `Action` that represents a mouse click on a button.
|
|
2220
2019
|
* Declared here to be used inside the template.
|
|
@@ -2243,20 +2042,23 @@ class CarouselComponent extends AccessibleComponent {
|
|
|
2243
2042
|
* Subject to stop the carousel.
|
|
2244
2043
|
*/
|
|
2245
2044
|
this.stop$ = new Subject();
|
|
2045
|
+
this.platformId = inject(PLATFORM_ID);
|
|
2246
2046
|
}
|
|
2247
2047
|
ngOnInit() {
|
|
2248
|
-
|
|
2048
|
+
const id = this.id();
|
|
2049
|
+
if (id === null || id === undefined) {
|
|
2249
2050
|
throw new Error('Internal library error - id must be defined');
|
|
2250
2051
|
}
|
|
2251
|
-
|
|
2052
|
+
const images = this.images();
|
|
2053
|
+
if (!images || images.length === 0) {
|
|
2252
2054
|
throw new Error('Internal library error - images array must be defined and with at least an element');
|
|
2253
2055
|
}
|
|
2254
|
-
this.configService.setConfig(
|
|
2255
|
-
const libConfig = this.configService.getConfig(
|
|
2056
|
+
this.configService.setConfig(id, this.config());
|
|
2057
|
+
const libConfig = this.configService.getConfig(id);
|
|
2256
2058
|
if (!libConfig) {
|
|
2257
2059
|
throw new Error('Internal library error - libConfig must be defined');
|
|
2258
2060
|
}
|
|
2259
|
-
this.currentImage =
|
|
2061
|
+
this.currentImage = images[0];
|
|
2260
2062
|
this.carouselDotsConfig = libConfig.carouselDotsConfig;
|
|
2261
2063
|
this.accessibilityConfig = libConfig.accessibilityConfig;
|
|
2262
2064
|
this.carouselSlideInfinite = libConfig.carouselSlideInfinite;
|
|
@@ -2265,11 +2067,12 @@ class CarouselComponent extends AccessibleComponent {
|
|
|
2265
2067
|
this.manageSlideConfig();
|
|
2266
2068
|
}
|
|
2267
2069
|
ngOnChanges(changes) {
|
|
2268
|
-
|
|
2070
|
+
const id = this.id();
|
|
2071
|
+
if (id === null || id === undefined) {
|
|
2269
2072
|
throw new Error('Internal library error - id must be defined');
|
|
2270
2073
|
}
|
|
2271
2074
|
// this.configService.setConfig(this.id, this.config);
|
|
2272
|
-
const libConfig = this.configService.getConfig(
|
|
2075
|
+
const libConfig = this.configService.getConfig(id);
|
|
2273
2076
|
if (!libConfig) {
|
|
2274
2077
|
throw new Error('Internal library error - libConfig must be defined');
|
|
2275
2078
|
}
|
|
@@ -2278,7 +2081,7 @@ class CarouselComponent extends AccessibleComponent {
|
|
|
2278
2081
|
if (configChange &&
|
|
2279
2082
|
!configChange.firstChange &&
|
|
2280
2083
|
(configChange.previousValue.carouselDotsConfig?.visible !== configChange.currentValue.carouselDotsConfig?.visible || (!configChange.previousValue.carouselDotsConfig && !configChange.currentValue.carouselDotsConfig))) {
|
|
2281
|
-
this.configService.setConfig(
|
|
2084
|
+
this.configService.setConfig(id, {
|
|
2282
2085
|
carouselDotsConfig: configChange.currentValue?.carouselDotsConfig
|
|
2283
2086
|
});
|
|
2284
2087
|
this.carouselDotsConfig = configChange.currentValue?.carouselDotsConfig;
|
|
@@ -2288,7 +2091,7 @@ class CarouselComponent extends AccessibleComponent {
|
|
|
2288
2091
|
if (configChange &&
|
|
2289
2092
|
!configChange.firstChange &&
|
|
2290
2093
|
(configChange.previousValue.carouselConfig?.showArrows !== configChange.currentValue.carouselConfig?.showArrows || (!configChange.previousValue.carouselConfig && !configChange.currentValue.carouselConfig))) {
|
|
2291
|
-
this.configService.setConfig(
|
|
2094
|
+
this.configService.setConfig(id, {
|
|
2292
2095
|
carouselConfig: configChange.currentValue?.carouselConfig
|
|
2293
2096
|
});
|
|
2294
2097
|
this.carouselConfig = configChange.currentValue?.carouselConfig;
|
|
@@ -2298,7 +2101,7 @@ class CarouselComponent extends AccessibleComponent {
|
|
|
2298
2101
|
if (configChange &&
|
|
2299
2102
|
!configChange.firstChange &&
|
|
2300
2103
|
(configChange.previousValue.carouselPlayConfig?.autoPlay !== configChange.currentValue.carouselPlayConfig?.autoPlay || (!configChange.previousValue.carouselPlayConfig && !configChange.currentValue.carouselPlayConfig))) {
|
|
2301
|
-
this.configService.setConfig(
|
|
2104
|
+
this.configService.setConfig(id, {
|
|
2302
2105
|
carouselPlayConfig: configChange.currentValue?.carouselPlayConfig
|
|
2303
2106
|
});
|
|
2304
2107
|
// this.configPlay = playConfigChange.currentValue;
|
|
@@ -2317,10 +2120,11 @@ class CarouselComponent extends AccessibleComponent {
|
|
|
2317
2120
|
// interval doesn't play well with SSR and protractor,
|
|
2318
2121
|
// so we should run it in the browser and outside Angular
|
|
2319
2122
|
if (isPlatformBrowser(this.platformId)) {
|
|
2320
|
-
|
|
2123
|
+
const id = this.id();
|
|
2124
|
+
if (id === null || id === undefined) {
|
|
2321
2125
|
throw new Error('Internal library error - id must be defined');
|
|
2322
2126
|
}
|
|
2323
|
-
const libConfig = this.configService.getConfig(
|
|
2127
|
+
const libConfig = this.configService.getConfig(id);
|
|
2324
2128
|
if (!libConfig || !libConfig.carouselPlayConfig) {
|
|
2325
2129
|
throw new Error('Internal library error - libConfig and carouselPlayConfig must be defined');
|
|
2326
2130
|
}
|
|
@@ -2344,7 +2148,7 @@ class CarouselComponent extends AccessibleComponent {
|
|
|
2344
2148
|
* @param index number of the clicked dot
|
|
2345
2149
|
*/
|
|
2346
2150
|
onClickDot(index) {
|
|
2347
|
-
this.changeCurrentImage(this.images[index], Action.NORMAL);
|
|
2151
|
+
this.changeCurrentImage(this.images()[index], Action.NORMAL);
|
|
2348
2152
|
}
|
|
2349
2153
|
/**
|
|
2350
2154
|
* Method called by events from both keyboard and mouse on a navigation arrow.
|
|
@@ -2366,17 +2170,18 @@ class CarouselComponent extends AccessibleComponent {
|
|
|
2366
2170
|
* Also, if modalGalleryEnable is true, you can open the modal-gallery.
|
|
2367
2171
|
*/
|
|
2368
2172
|
onClickCurrentImage() {
|
|
2369
|
-
|
|
2173
|
+
const id = this.id();
|
|
2174
|
+
if (id === null || id === undefined) {
|
|
2370
2175
|
throw new Error('Internal library error - id must be defined');
|
|
2371
2176
|
}
|
|
2372
|
-
const libConfig = this.configService.getConfig(
|
|
2177
|
+
const libConfig = this.configService.getConfig(id);
|
|
2373
2178
|
if (!libConfig || !libConfig.carouselConfig || !this.currentImage) {
|
|
2374
2179
|
throw new Error('Internal library error - libConfig, carouselConfig and currentImage must be defined');
|
|
2375
2180
|
}
|
|
2376
2181
|
if (!libConfig.carouselConfig.modalGalleryEnable) {
|
|
2377
2182
|
return;
|
|
2378
2183
|
}
|
|
2379
|
-
const index = getIndex(this.currentImage, this.images);
|
|
2184
|
+
const index = getIndex(this.currentImage, this.images());
|
|
2380
2185
|
this.clickImage.emit(index);
|
|
2381
2186
|
}
|
|
2382
2187
|
/**
|
|
@@ -2388,10 +2193,11 @@ class CarouselComponent extends AccessibleComponent {
|
|
|
2388
2193
|
* @throws an Error if description isn't available
|
|
2389
2194
|
*/
|
|
2390
2195
|
getDescriptionToDisplay(image = this.currentImage) {
|
|
2391
|
-
|
|
2196
|
+
const id = this.id();
|
|
2197
|
+
if (id === null || id === undefined) {
|
|
2392
2198
|
throw new Error('Internal library error - id must be defined');
|
|
2393
2199
|
}
|
|
2394
|
-
const libConfig = this.configService.getConfig(
|
|
2200
|
+
const libConfig = this.configService.getConfig(id);
|
|
2395
2201
|
if (!libConfig) {
|
|
2396
2202
|
throw new Error('Internal library error - libConfig must be defined');
|
|
2397
2203
|
}
|
|
@@ -2418,10 +2224,11 @@ class CarouselComponent extends AccessibleComponent {
|
|
|
2418
2224
|
* @param action String that represent the direction of the swipe action. 'swiperight' by default.
|
|
2419
2225
|
*/
|
|
2420
2226
|
swipe(action = 'swiperight') {
|
|
2421
|
-
|
|
2227
|
+
const id = this.id();
|
|
2228
|
+
if (id === null || id === undefined) {
|
|
2422
2229
|
throw new Error('Internal library error - id must be defined');
|
|
2423
2230
|
}
|
|
2424
|
-
const libConfig = this.configService.getConfig(
|
|
2231
|
+
const libConfig = this.configService.getConfig(id);
|
|
2425
2232
|
if (!libConfig || !libConfig.carouselImageConfig) {
|
|
2426
2233
|
throw new Error('Internal library error - libConfig and carouselImageConfig must be defined');
|
|
2427
2234
|
}
|
|
@@ -2470,7 +2277,7 @@ class CarouselComponent extends AccessibleComponent {
|
|
|
2470
2277
|
*/
|
|
2471
2278
|
nextImage(action = Action.NORMAL) {
|
|
2472
2279
|
// check if nextImage should be blocked
|
|
2473
|
-
if (this.isPreventSliding(this.images.length - 1)) {
|
|
2280
|
+
if (this.isPreventSliding(this.images().length - 1)) {
|
|
2474
2281
|
return;
|
|
2475
2282
|
}
|
|
2476
2283
|
this.changeCurrentImage(this.getNextImage(), action);
|
|
@@ -2482,7 +2289,7 @@ class CarouselComponent extends AccessibleComponent {
|
|
|
2482
2289
|
* @param event an ImageEvent object with the relative action and the index of the clicked preview.
|
|
2483
2290
|
*/
|
|
2484
2291
|
onClickPreview(event) {
|
|
2485
|
-
const imageFound = this.images[event.result];
|
|
2292
|
+
const imageFound = this.images()[event.result];
|
|
2486
2293
|
if (!!imageFound) {
|
|
2487
2294
|
this.manageSlideConfig();
|
|
2488
2295
|
this.changeCurrentImage(imageFound, event.action);
|
|
@@ -2511,7 +2318,7 @@ class CarouselComponent extends AccessibleComponent {
|
|
|
2511
2318
|
if (!image) {
|
|
2512
2319
|
return '';
|
|
2513
2320
|
}
|
|
2514
|
-
return image.modal && image.modal.description ? image.modal.description : `Image ${getIndex(image, this.images) + 1}`;
|
|
2321
|
+
return image.modal && image.modal.description ? image.modal.description : `Image ${getIndex(image, this.images()) + 1}`;
|
|
2515
2322
|
}
|
|
2516
2323
|
// TODO remove this because duplicated
|
|
2517
2324
|
/**
|
|
@@ -2523,10 +2330,11 @@ class CarouselComponent extends AccessibleComponent {
|
|
|
2523
2330
|
* @throws an Error if description isn't available
|
|
2524
2331
|
*/
|
|
2525
2332
|
getTitleToDisplay(image = this.currentImage) {
|
|
2526
|
-
|
|
2333
|
+
const id = this.id();
|
|
2334
|
+
if (id === null || id === undefined) {
|
|
2527
2335
|
throw new Error('Internal library error - id must be defined');
|
|
2528
2336
|
}
|
|
2529
|
-
const libConfig = this.configService.getConfig(
|
|
2337
|
+
const libConfig = this.configService.getConfig(id);
|
|
2530
2338
|
if (!libConfig || !libConfig.carouselImageConfig) {
|
|
2531
2339
|
throw new Error('Internal library error - libConfig and carouselImageConfig must be defined');
|
|
2532
2340
|
}
|
|
@@ -2565,15 +2373,16 @@ class CarouselComponent extends AccessibleComponent {
|
|
|
2565
2373
|
* @param action Enum of type `Action` that represents the source action that triggered the change.
|
|
2566
2374
|
*/
|
|
2567
2375
|
changeCurrentImage(image, action) {
|
|
2568
|
-
|
|
2376
|
+
const id = this.id();
|
|
2377
|
+
if (id === null || id === undefined) {
|
|
2569
2378
|
throw new Error('Internal library error - id must be defined');
|
|
2570
2379
|
}
|
|
2571
2380
|
this.currentImage = image;
|
|
2572
|
-
const index = getIndex(image, this.images);
|
|
2381
|
+
const index = getIndex(image, this.images());
|
|
2573
2382
|
// emit first/last event based on newIndex value
|
|
2574
2383
|
this.emitBoundaryEvent(action, index);
|
|
2575
2384
|
// emit current visible image index
|
|
2576
|
-
this.changeImage.emit(new ImageEvent(
|
|
2385
|
+
this.changeImage.emit(new ImageEvent(id, action, index + 1));
|
|
2577
2386
|
}
|
|
2578
2387
|
/**
|
|
2579
2388
|
* Private method to get the next index.
|
|
@@ -2584,15 +2393,15 @@ class CarouselComponent extends AccessibleComponent {
|
|
|
2584
2393
|
if (!this.currentImage) {
|
|
2585
2394
|
throw new Error('Internal library error - currentImage must be defined');
|
|
2586
2395
|
}
|
|
2587
|
-
const currentIndex = getIndex(this.currentImage, this.images);
|
|
2396
|
+
const currentIndex = getIndex(this.currentImage, this.images());
|
|
2588
2397
|
let newIndex;
|
|
2589
|
-
if (currentIndex >= 0 && currentIndex < this.images.length - 1) {
|
|
2398
|
+
if (currentIndex >= 0 && currentIndex < this.images().length - 1) {
|
|
2590
2399
|
newIndex = currentIndex + 1;
|
|
2591
2400
|
}
|
|
2592
2401
|
else {
|
|
2593
2402
|
newIndex = 0; // start from the first index
|
|
2594
2403
|
}
|
|
2595
|
-
return this.images[newIndex];
|
|
2404
|
+
return this.images()[newIndex];
|
|
2596
2405
|
}
|
|
2597
2406
|
/**
|
|
2598
2407
|
* Private method to get the previous index.
|
|
@@ -2603,15 +2412,15 @@ class CarouselComponent extends AccessibleComponent {
|
|
|
2603
2412
|
if (!this.currentImage) {
|
|
2604
2413
|
throw new Error('Internal library error - currentImage must be defined');
|
|
2605
2414
|
}
|
|
2606
|
-
const currentIndex = getIndex(this.currentImage, this.images);
|
|
2415
|
+
const currentIndex = getIndex(this.currentImage, this.images());
|
|
2607
2416
|
let newIndex;
|
|
2608
|
-
if (currentIndex > 0 && currentIndex <= this.images.length - 1) {
|
|
2417
|
+
if (currentIndex > 0 && currentIndex <= this.images().length - 1) {
|
|
2609
2418
|
newIndex = currentIndex - 1;
|
|
2610
2419
|
}
|
|
2611
2420
|
else {
|
|
2612
|
-
newIndex = this.images.length - 1; // start from the last index
|
|
2421
|
+
newIndex = this.images().length - 1; // start from the last index
|
|
2613
2422
|
}
|
|
2614
|
-
return this.images[newIndex];
|
|
2423
|
+
return this.images()[newIndex];
|
|
2615
2424
|
}
|
|
2616
2425
|
/**
|
|
2617
2426
|
* Private method to build a text description.
|
|
@@ -2621,10 +2430,11 @@ class CarouselComponent extends AccessibleComponent {
|
|
|
2621
2430
|
* @returns String description built concatenating image fields with a specific logic.
|
|
2622
2431
|
*/
|
|
2623
2432
|
buildTextDescription(image, imageWithoutDescription) {
|
|
2624
|
-
|
|
2433
|
+
const id = this.id();
|
|
2434
|
+
if (id === null || id === undefined) {
|
|
2625
2435
|
throw new Error('Internal library error - id must be defined');
|
|
2626
2436
|
}
|
|
2627
|
-
const libConfig = this.configService.getConfig(
|
|
2437
|
+
const libConfig = this.configService.getConfig(id);
|
|
2628
2438
|
if (!libConfig || !libConfig.carouselImageConfig) {
|
|
2629
2439
|
throw new Error('Internal library error - libConfig and carouselImageConfig must be defined');
|
|
2630
2440
|
}
|
|
@@ -2639,12 +2449,12 @@ class CarouselComponent extends AccessibleComponent {
|
|
|
2639
2449
|
if (configCurrentImageCarousel.description.customFullDescription && configCurrentImageCarousel.description.customFullDescription !== '') {
|
|
2640
2450
|
return configCurrentImageCarousel.description.customFullDescription;
|
|
2641
2451
|
}
|
|
2642
|
-
const currentIndex = getIndex(image, this.images);
|
|
2452
|
+
const currentIndex = getIndex(image, this.images());
|
|
2643
2453
|
// If the current image hasn't a description,
|
|
2644
2454
|
// prevent to write the ' - ' (or this.description.beforeTextDescription)
|
|
2645
2455
|
const prevDescription = configCurrentImageCarousel.description.imageText ? configCurrentImageCarousel.description.imageText : '';
|
|
2646
2456
|
const midSeparator = configCurrentImageCarousel.description.numberSeparator ? configCurrentImageCarousel.description.numberSeparator : '';
|
|
2647
|
-
const middleDescription = currentIndex + 1 + midSeparator + this.images.length;
|
|
2457
|
+
const middleDescription = currentIndex + 1 + midSeparator + this.images().length;
|
|
2648
2458
|
if (imageWithoutDescription) {
|
|
2649
2459
|
return prevDescription + middleDescription;
|
|
2650
2460
|
}
|
|
@@ -2658,7 +2468,8 @@ class CarouselComponent extends AccessibleComponent {
|
|
|
2658
2468
|
* @param currentIndex number is the index of the current image
|
|
2659
2469
|
*/
|
|
2660
2470
|
handleBoundaries(currentIndex) {
|
|
2661
|
-
|
|
2471
|
+
const images = this.images();
|
|
2472
|
+
if (images.length === 1) {
|
|
2662
2473
|
this.isFirstImage = true;
|
|
2663
2474
|
this.isLastImage = true;
|
|
2664
2475
|
return;
|
|
@@ -2669,7 +2480,7 @@ class CarouselComponent extends AccessibleComponent {
|
|
|
2669
2480
|
this.isFirstImage = true;
|
|
2670
2481
|
this.isLastImage = false;
|
|
2671
2482
|
break;
|
|
2672
|
-
case
|
|
2483
|
+
case images.length - 1:
|
|
2673
2484
|
// execute this only if infinite sliding is disabled
|
|
2674
2485
|
this.isFirstImage = false;
|
|
2675
2486
|
this.isLastImage = true;
|
|
@@ -2685,10 +2496,11 @@ class CarouselComponent extends AccessibleComponent {
|
|
|
2685
2496
|
* This is based on the slideConfig input to enable/disable 'infinite sliding'.
|
|
2686
2497
|
*/
|
|
2687
2498
|
manageSlideConfig() {
|
|
2688
|
-
|
|
2499
|
+
const id = this.id();
|
|
2500
|
+
if (id === null || id === undefined) {
|
|
2689
2501
|
throw new Error('Internal library error - id must be defined');
|
|
2690
2502
|
}
|
|
2691
|
-
const libConfig = this.configService.getConfig(
|
|
2503
|
+
const libConfig = this.configService.getConfig(id);
|
|
2692
2504
|
if (!libConfig) {
|
|
2693
2505
|
throw new Error('Internal library error - libConfig must be defined');
|
|
2694
2506
|
}
|
|
@@ -2697,7 +2509,7 @@ class CarouselComponent extends AccessibleComponent {
|
|
|
2697
2509
|
}
|
|
2698
2510
|
let index;
|
|
2699
2511
|
try {
|
|
2700
|
-
index = getIndex(this.currentImage, this.images);
|
|
2512
|
+
index = getIndex(this.currentImage, this.images());
|
|
2701
2513
|
}
|
|
2702
2514
|
catch (err) {
|
|
2703
2515
|
console.error('Cannot get the current image index in current-image');
|
|
@@ -2719,16 +2531,17 @@ class CarouselComponent extends AccessibleComponent {
|
|
|
2719
2531
|
* @param indexToCheck is the index number of the image (the first or the last one).
|
|
2720
2532
|
*/
|
|
2721
2533
|
emitBoundaryEvent(action, indexToCheck) {
|
|
2722
|
-
|
|
2534
|
+
const id = this.id();
|
|
2535
|
+
if (id === null || id === undefined) {
|
|
2723
2536
|
return;
|
|
2724
2537
|
}
|
|
2725
2538
|
// to emit first/last event
|
|
2726
2539
|
switch (indexToCheck) {
|
|
2727
2540
|
case 0:
|
|
2728
|
-
this.firstImage.emit(new ImageEvent(
|
|
2541
|
+
this.firstImage.emit(new ImageEvent(id, action, true));
|
|
2729
2542
|
break;
|
|
2730
|
-
case this.images.length - 1:
|
|
2731
|
-
this.lastImage.emit(new ImageEvent(
|
|
2543
|
+
case this.images().length - 1:
|
|
2544
|
+
this.lastImage.emit(new ImageEvent(id, action, true));
|
|
2732
2545
|
break;
|
|
2733
2546
|
}
|
|
2734
2547
|
}
|
|
@@ -2742,45 +2555,29 @@ class CarouselComponent extends AccessibleComponent {
|
|
|
2742
2555
|
* either the first or the last one.
|
|
2743
2556
|
*/
|
|
2744
2557
|
isPreventSliding(boundaryIndex) {
|
|
2745
|
-
|
|
2558
|
+
const id = this.id();
|
|
2559
|
+
if (id === null || id === undefined) {
|
|
2746
2560
|
throw new Error('Internal library error - id must be defined');
|
|
2747
2561
|
}
|
|
2748
|
-
const libConfig = this.configService.getConfig(
|
|
2562
|
+
const libConfig = this.configService.getConfig(id);
|
|
2749
2563
|
if (!libConfig) {
|
|
2750
2564
|
throw new Error('Internal library error - libConfig must be defined');
|
|
2751
2565
|
}
|
|
2752
2566
|
if (!this.currentImage) {
|
|
2753
2567
|
throw new Error('Internal library error - currentImage must be defined');
|
|
2754
2568
|
}
|
|
2755
|
-
return !libConfig.carouselSlideInfinite && getIndex(this.currentImage, this.images) === boundaryIndex;
|
|
2569
|
+
return !libConfig.carouselSlideInfinite && getIndex(this.currentImage, this.images()) === boundaryIndex;
|
|
2756
2570
|
}
|
|
2757
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: CarouselComponent, deps: [{ token:
|
|
2758
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.7", type: CarouselComponent, isStandalone: true, selector: "ks-carousel", inputs: { id: "id", images: "images", config: "config" }, outputs: { clickImage: "clickImage", changeImage: "changeImage", firstImage: "firstImage", lastImage: "lastImage" }, host: { listeners: { "mouseenter": "onMouseEnter()", "mouseleave": "onMouseLeave()", "keydown.arrowLeft": "onKeyDownLeft()", "keydown.arrowRight": "onKeyDownLRight()" }, properties: { "attr.aria-label": "this.ariaLabel" } }, providers: [ConfigService], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<main id=\"carousel-container\"\n [attr.aria-label]=\"accessibilityConfig?.carouselContainerAriaLabel\"\n [title]=\"accessibilityConfig?.carouselContainerTitle\"\n ksMaxSize [maxSizeConfig]=\"{maxWidth: carouselConfig?.maxWidth,\n maxHeight: ''}\">\n\n\n <!-- Workaround to support 2 ng-content in the same template in 2 @if (https://github.com/angular/angular/issues/22972) -->\n <!-- Is this still required??? Issue is closed!-->\n <ng-template #content>\n <ng-content
|
|
2571
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: CarouselComponent, deps: [{ token: i0.NgZone }, { token: ConfigService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2572
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.7", type: CarouselComponent, isStandalone: true, selector: "ks-carousel", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: true, transformFunction: null }, images: { classPropertyName: "images", publicName: "images", isSignal: true, isRequired: false, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { clickImage: "clickImage", changeImage: "changeImage", firstImage: "firstImage", lastImage: "lastImage" }, host: { listeners: { "mouseenter": "onMouseEnter()", "mouseleave": "onMouseLeave()", "keydown.arrowLeft": "onKeyDownLeft()", "keydown.arrowRight": "onKeyDownLRight()" }, properties: { "attr.aria-label": "this.ariaLabel" } }, providers: [ConfigService], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<main id=\"carousel-container\"\n [attr.aria-label]=\"accessibilityConfig?.carouselContainerAriaLabel\"\n [title]=\"accessibilityConfig?.carouselContainerTitle\"\n ksMaxSize [maxSizeConfig]=\"{maxWidth: carouselConfig?.maxWidth,\n maxHeight: ''}\">\n\n\n <!-- Workaround to support 2 ng-content in the same template in 2 @if (https://github.com/angular/angular/issues/22972) -->\n <!-- Is this still required??? Issue is closed!-->\n <ng-template #content>\n <ng-content />\n </ng-template>\n\n @if (currentImage && currentImage.modal) {\n <figure class=\"current-figure\"\n ksSize [sizeConfig]=\"{width: carouselConfig?.maxWidth, height: ''}\">\n\n @if (carouselConfig?.showArrows) {\n <a class=\"nav-left\"\n [attr.aria-label]=\"accessibilityConfig?.carouselPrevImageAriaLabel\"\n [tabIndex]=\"isLastImage && !carouselSlideInfinite ? -1 : 0\" role=\"button\"\n (click)=\"onNavigationEvent('left', $event, clickAction)\" (keyup)=\"onNavigationEvent('left', $event, keyboardAction)\">\n <div class=\"inside {{(isFirstImage && !carouselSlideInfinite) || !carouselConfig?.showArrows ? 'empty-arrow-image' : 'left-arrow-image'}}\"\n aria-hidden=\"true\"\n [title]=\"accessibilityConfig?.carouselPrevImageTitle\"></div>\n </a>\n }\n\n <ng-container *ngTemplateOutlet=\"content\" />\n <picture class=\"current-image\" ksMaxSize [maxSizeConfig]=\"{maxWidth: carouselConfig?.maxWidth,\n maxHeight: carouselConfig?.maxHeight}\">\n @for (source of currentImage.modal?.sources; let i = $index; track i) {\n <source [media]=\"source.media\" [srcset]=\"source.srcset\">\n }\n <img [id]=\"currentImage.id\"\n loading=\"{{ currentImage.loading }}\"\n [attr.fetchpriority]=\"currentImage.fetchpriority\"\n [style.object-fit]=\"carouselConfig?.objectFit\"\n ksMaxSize [maxSizeConfig]=\"{maxWidth: carouselConfig?.maxWidth,\n maxHeight: carouselConfig?.maxHeight}\"\n [src]=\"currentImage.modal.img\"\n ksFallbackImage [fallbackImg]=\"currentImage.modal.fallbackImg\"\n [attr.aria-label]=\"currentImage.modal.ariaLabel\"\n [title]=\"(currentImage.modal.title || currentImage.modal.title === '') ? currentImage.modal.title : getTitleToDisplay()\"\n alt=\"{{currentImage.modal.alt ? currentImage.modal.alt : getAltDescriptionByImage()}}\"\n [tabIndex]=\"0\" role=\"img\"\n (click)=\"onClickCurrentImage()\"\n (swipeleft)=\"swipe($event.type)\"\n (swiperight)=\"swipe($event.type)\" />\n </picture>\n @if (getDescriptionToDisplay() !== '') {\n <figcaption class=\"description\"\n ksDescription [description]=\"carouselImageConfig?.description\"\n [innerHTML]=\"getDescriptionToDisplay()\"></figcaption>\n }\n\n @if (carouselConfig?.showArrows) {\n <a class=\"nav-right\"\n [attr.aria-label]=\"accessibilityConfig?.carouselNextImageAriaLabel\"\n [tabIndex]=\"isLastImage && !carouselSlideInfinite ? -1 : 0\" role=\"button\"\n (click)=\"onNavigationEvent('right', $event, clickAction)\" (keyup)=\"onNavigationEvent('right', $event, keyboardAction)\">\n <div class=\"inside {{(isLastImage && !carouselSlideInfinite) || !carouselConfig?.showArrows ? 'empty-arrow-image' : 'right-arrow-image'}}\"\n aria-hidden=\"true\"\n [title]=\"accessibilityConfig?.carouselNextImageTitle\"></div>\n </a>\n }\n\n @if (carouselDotsConfig) {\n <div id=\"dots\">\n <ks-dots [id]=\"id()\"\n [currentImage]=\"currentImage\"\n [images]=\"images()\"\n [dotsConfig]=\"carouselDotsConfig\"\n [accessibilityConfig]=\"accessibilityConfig!\"\n (clickDot)=\"onClickDot($event)\" />\n </div>\n }\n\n </figure>\n }\n\n</main>\n\n@if (currentImage) {\n <ks-carousel-previews [id]=\"id()\"\n [images]=\"images()\"\n [currentImage]=\"currentImage\"\n (clickPreview)=\"onClickPreview($event)\" />\n}\n", styles: [":host{display:flex;flex-direction:column;justify-content:flex-start;align-items:center}#carousel-container{display:flex;flex-direction:row;align-items:center;justify-content:space-between;width:100%}#carousel-container>.current-figure{animation:fadein-visible .8s;text-align:center;margin:0;position:relative}#carousel-container>.current-figure .nav,#carousel-container>.current-figure>.nav-right,#carousel-container>.current-figure>.nav-left{animation:animatezoom 1s;cursor:pointer;transition:all .5s;top:50%;position:absolute}#carousel-container>.current-figure .nav:hover,#carousel-container>.current-figure>.nav-right:hover,#carousel-container>.current-figure>.nav-left:hover{transform:scale(1.1)}#carousel-container>.current-figure>.nav-left{left:5px}#carousel-container>.current-figure>.nav-right{right:5px}#carousel-container>.current-figure>.current-image{display:block}#carousel-container>.current-figure>.current-image>img{width:100%;height:auto;display:block}#carousel-container>.current-figure>figcaption{padding:10px;position:absolute;bottom:0;left:0;right:0}#carousel-container>.current-figure>figcaption .description{font-weight:700;text-align:center}#carousel-container>.current-figure>#dots{position:absolute;bottom:20px;width:100%}\n", ".arrow-image,.right-arrow-image,.left-arrow-image,.empty-arrow-image{width:30px;height:30px;background-size:30px}.empty-arrow-image{background:#000;opacity:0}.left-arrow-image{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/PjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4PSIwcHgiIHk9IjBweCIgdmlld0JveD0iMCAwIDQ3Ny4xNzUgNDc3LjE3NSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgNDc3LjE3NSA0NzcuMTc1OyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIgd2lkdGg9IjUxMnB4IiBoZWlnaHQ9IjUxMnB4Ij48Zz48cGF0aCBkPSJNMTQ1LjE4OCwyMzguNTc1bDIxNS41LTIxNS41YzUuMy01LjMsNS4zLTEzLjgsMC0xOS4xcy0xMy44LTUuMy0xOS4xLDBsLTIyNS4xLDIyNS4xYy01LjMsNS4zLTUuMywxMy44LDAsMTkuMWwyMjUuMSwyMjUgICBjMi42LDIuNiw2LjEsNCw5LjUsNHM2LjktMS4zLDkuNS00YzUuMy01LjMsNS4zLTEzLjgsMC0xOS4xTDE0NS4xODgsMjM4LjU3NXoiIGZpbGw9IiNGRkZGRkYiLz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PC9zdmc+);opacity:.8;transition:all .5s}.left-arrow-image:hover{transform:scale(1.2)}.right-arrow-image{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/PjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4PSIwcHgiIHk9IjBweCIgdmlld0JveD0iMCAwIDQ3Ny4xNzUgNDc3LjE3NSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgNDc3LjE3NSA0NzcuMTc1OyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIgd2lkdGg9IjUxMnB4IiBoZWlnaHQ9IjUxMnB4Ij48Zz48cGF0aCBkPSJNMzYwLjczMSwyMjkuMDc1bC0yMjUuMS0yMjUuMWMtNS4zLTUuMy0xMy44LTUuMy0xOS4xLDBzLTUuMywxMy44LDAsMTkuMWwyMTUuNSwyMTUuNWwtMjE1LjUsMjE1LjUgICBjLTUuMyw1LjMtNS4zLDEzLjgsMCwxOS4xYzIuNiwyLjYsNi4xLDQsOS41LDRjMy40LDAsNi45LTEuMyw5LjUtNGwyMjUuMS0yMjUuMUMzNjUuOTMxLDI0Mi44NzUsMzY1LjkzMSwyMzQuMjc1LDM2MC43MzEsMjI5LjA3NXogICAiIGZpbGw9IiNGRkZGRkYiLz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PC9zdmc+);opacity:.8;transition:all .5s}.right-arrow-image:hover{transform:scale(1.2)}\n"], dependencies: [{ kind: "directive", type: MaxSizeDirective, selector: "[ksMaxSize]", inputs: ["maxSizeConfig"] }, { kind: "directive", type: SizeDirective, selector: "[ksSize]", inputs: ["sizeConfig"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: FallbackImageDirective, selector: "[ksFallbackImage]", inputs: ["fallbackImg"], outputs: ["fallbackApplied"] }, { kind: "directive", type: DescriptionDirective, selector: "[ksDescription]", inputs: ["description"] }, { kind: "component", type: DotsComponent, selector: "ks-dots", inputs: ["id", "currentImage", "images", "dotsConfig", "accessibilityConfig"], outputs: ["clickDot"] }, { kind: "component", type: CarouselPreviewsComponent, selector: "ks-carousel-previews", inputs: ["id", "currentImage", "images"], outputs: ["clickPreview"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2759
2573
|
}
|
|
2760
2574
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: CarouselComponent, decorators: [{
|
|
2761
2575
|
type: Component,
|
|
2762
2576
|
args: [{ selector: 'ks-carousel', changeDetection: ChangeDetectionStrategy.OnPush, providers: [ConfigService], imports: [MaxSizeDirective, SizeDirective, NgTemplateOutlet,
|
|
2763
|
-
FallbackImageDirective, DescriptionDirective, DotsComponent, CarouselPreviewsComponent], template: "<main id=\"carousel-container\"\n [attr.aria-label]=\"accessibilityConfig?.carouselContainerAriaLabel\"\n [title]=\"accessibilityConfig?.carouselContainerTitle\"\n ksMaxSize [maxSizeConfig]=\"{maxWidth: carouselConfig?.maxWidth,\n maxHeight: ''}\">\n\n\n <!-- Workaround to support 2 ng-content in the same template in 2 @if (https://github.com/angular/angular/issues/22972) -->\n <!-- Is this still required??? Issue is closed!-->\n <ng-template #content>\n <ng-content
|
|
2764
|
-
}], ctorParameters: () => [{ type:
|
|
2765
|
-
type: Inject,
|
|
2766
|
-
args: [PLATFORM_ID]
|
|
2767
|
-
}] }, { type: i0.NgZone }, { type: ModalGalleryService }, { type: ConfigService }, { type: i0.ChangeDetectorRef }], propDecorators: { ariaLabel: [{
|
|
2577
|
+
FallbackImageDirective, DescriptionDirective, DotsComponent, CarouselPreviewsComponent], template: "<main id=\"carousel-container\"\n [attr.aria-label]=\"accessibilityConfig?.carouselContainerAriaLabel\"\n [title]=\"accessibilityConfig?.carouselContainerTitle\"\n ksMaxSize [maxSizeConfig]=\"{maxWidth: carouselConfig?.maxWidth,\n maxHeight: ''}\">\n\n\n <!-- Workaround to support 2 ng-content in the same template in 2 @if (https://github.com/angular/angular/issues/22972) -->\n <!-- Is this still required??? Issue is closed!-->\n <ng-template #content>\n <ng-content />\n </ng-template>\n\n @if (currentImage && currentImage.modal) {\n <figure class=\"current-figure\"\n ksSize [sizeConfig]=\"{width: carouselConfig?.maxWidth, height: ''}\">\n\n @if (carouselConfig?.showArrows) {\n <a class=\"nav-left\"\n [attr.aria-label]=\"accessibilityConfig?.carouselPrevImageAriaLabel\"\n [tabIndex]=\"isLastImage && !carouselSlideInfinite ? -1 : 0\" role=\"button\"\n (click)=\"onNavigationEvent('left', $event, clickAction)\" (keyup)=\"onNavigationEvent('left', $event, keyboardAction)\">\n <div class=\"inside {{(isFirstImage && !carouselSlideInfinite) || !carouselConfig?.showArrows ? 'empty-arrow-image' : 'left-arrow-image'}}\"\n aria-hidden=\"true\"\n [title]=\"accessibilityConfig?.carouselPrevImageTitle\"></div>\n </a>\n }\n\n <ng-container *ngTemplateOutlet=\"content\" />\n <picture class=\"current-image\" ksMaxSize [maxSizeConfig]=\"{maxWidth: carouselConfig?.maxWidth,\n maxHeight: carouselConfig?.maxHeight}\">\n @for (source of currentImage.modal?.sources; let i = $index; track i) {\n <source [media]=\"source.media\" [srcset]=\"source.srcset\">\n }\n <img [id]=\"currentImage.id\"\n loading=\"{{ currentImage.loading }}\"\n [attr.fetchpriority]=\"currentImage.fetchpriority\"\n [style.object-fit]=\"carouselConfig?.objectFit\"\n ksMaxSize [maxSizeConfig]=\"{maxWidth: carouselConfig?.maxWidth,\n maxHeight: carouselConfig?.maxHeight}\"\n [src]=\"currentImage.modal.img\"\n ksFallbackImage [fallbackImg]=\"currentImage.modal.fallbackImg\"\n [attr.aria-label]=\"currentImage.modal.ariaLabel\"\n [title]=\"(currentImage.modal.title || currentImage.modal.title === '') ? currentImage.modal.title : getTitleToDisplay()\"\n alt=\"{{currentImage.modal.alt ? currentImage.modal.alt : getAltDescriptionByImage()}}\"\n [tabIndex]=\"0\" role=\"img\"\n (click)=\"onClickCurrentImage()\"\n (swipeleft)=\"swipe($event.type)\"\n (swiperight)=\"swipe($event.type)\" />\n </picture>\n @if (getDescriptionToDisplay() !== '') {\n <figcaption class=\"description\"\n ksDescription [description]=\"carouselImageConfig?.description\"\n [innerHTML]=\"getDescriptionToDisplay()\"></figcaption>\n }\n\n @if (carouselConfig?.showArrows) {\n <a class=\"nav-right\"\n [attr.aria-label]=\"accessibilityConfig?.carouselNextImageAriaLabel\"\n [tabIndex]=\"isLastImage && !carouselSlideInfinite ? -1 : 0\" role=\"button\"\n (click)=\"onNavigationEvent('right', $event, clickAction)\" (keyup)=\"onNavigationEvent('right', $event, keyboardAction)\">\n <div class=\"inside {{(isLastImage && !carouselSlideInfinite) || !carouselConfig?.showArrows ? 'empty-arrow-image' : 'right-arrow-image'}}\"\n aria-hidden=\"true\"\n [title]=\"accessibilityConfig?.carouselNextImageTitle\"></div>\n </a>\n }\n\n @if (carouselDotsConfig) {\n <div id=\"dots\">\n <ks-dots [id]=\"id()\"\n [currentImage]=\"currentImage\"\n [images]=\"images()\"\n [dotsConfig]=\"carouselDotsConfig\"\n [accessibilityConfig]=\"accessibilityConfig!\"\n (clickDot)=\"onClickDot($event)\" />\n </div>\n }\n\n </figure>\n }\n\n</main>\n\n@if (currentImage) {\n <ks-carousel-previews [id]=\"id()\"\n [images]=\"images()\"\n [currentImage]=\"currentImage\"\n (clickPreview)=\"onClickPreview($event)\" />\n}\n", styles: [":host{display:flex;flex-direction:column;justify-content:flex-start;align-items:center}#carousel-container{display:flex;flex-direction:row;align-items:center;justify-content:space-between;width:100%}#carousel-container>.current-figure{animation:fadein-visible .8s;text-align:center;margin:0;position:relative}#carousel-container>.current-figure .nav,#carousel-container>.current-figure>.nav-right,#carousel-container>.current-figure>.nav-left{animation:animatezoom 1s;cursor:pointer;transition:all .5s;top:50%;position:absolute}#carousel-container>.current-figure .nav:hover,#carousel-container>.current-figure>.nav-right:hover,#carousel-container>.current-figure>.nav-left:hover{transform:scale(1.1)}#carousel-container>.current-figure>.nav-left{left:5px}#carousel-container>.current-figure>.nav-right{right:5px}#carousel-container>.current-figure>.current-image{display:block}#carousel-container>.current-figure>.current-image>img{width:100%;height:auto;display:block}#carousel-container>.current-figure>figcaption{padding:10px;position:absolute;bottom:0;left:0;right:0}#carousel-container>.current-figure>figcaption .description{font-weight:700;text-align:center}#carousel-container>.current-figure>#dots{position:absolute;bottom:20px;width:100%}\n", ".arrow-image,.right-arrow-image,.left-arrow-image,.empty-arrow-image{width:30px;height:30px;background-size:30px}.empty-arrow-image{background:#000;opacity:0}.left-arrow-image{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/PjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4PSIwcHgiIHk9IjBweCIgdmlld0JveD0iMCAwIDQ3Ny4xNzUgNDc3LjE3NSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgNDc3LjE3NSA0NzcuMTc1OyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIgd2lkdGg9IjUxMnB4IiBoZWlnaHQ9IjUxMnB4Ij48Zz48cGF0aCBkPSJNMTQ1LjE4OCwyMzguNTc1bDIxNS41LTIxNS41YzUuMy01LjMsNS4zLTEzLjgsMC0xOS4xcy0xMy44LTUuMy0xOS4xLDBsLTIyNS4xLDIyNS4xYy01LjMsNS4zLTUuMywxMy44LDAsMTkuMWwyMjUuMSwyMjUgICBjMi42LDIuNiw2LjEsNCw5LjUsNHM2LjktMS4zLDkuNS00YzUuMy01LjMsNS4zLTEzLjgsMC0xOS4xTDE0NS4xODgsMjM4LjU3NXoiIGZpbGw9IiNGRkZGRkYiLz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PC9zdmc+);opacity:.8;transition:all .5s}.left-arrow-image:hover{transform:scale(1.2)}.right-arrow-image{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/PjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4PSIwcHgiIHk9IjBweCIgdmlld0JveD0iMCAwIDQ3Ny4xNzUgNDc3LjE3NSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgNDc3LjE3NSA0NzcuMTc1OyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIgd2lkdGg9IjUxMnB4IiBoZWlnaHQ9IjUxMnB4Ij48Zz48cGF0aCBkPSJNMzYwLjczMSwyMjkuMDc1bC0yMjUuMS0yMjUuMWMtNS4zLTUuMy0xMy44LTUuMy0xOS4xLDBzLTUuMywxMy44LDAsMTkuMWwyMTUuNSwyMTUuNWwtMjE1LjUsMjE1LjUgICBjLTUuMyw1LjMtNS4zLDEzLjgsMCwxOS4xYzIuNiwyLjYsNi4xLDQsOS41LDRjMy40LDAsNi45LTEuMyw5LjUtNGwyMjUuMS0yMjUuMUMzNjUuOTMxLDI0Mi44NzUsMzY1LjkzMSwyMzQuMjc1LDM2MC43MzEsMjI5LjA3NXogICAiIGZpbGw9IiNGRkZGRkYiLz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PC9zdmc+);opacity:.8;transition:all .5s}.right-arrow-image:hover{transform:scale(1.2)}\n"] }]
|
|
2578
|
+
}], ctorParameters: () => [{ type: i0.NgZone }, { type: ConfigService }, { type: i0.ChangeDetectorRef }], propDecorators: { ariaLabel: [{
|
|
2768
2579
|
type: HostBinding,
|
|
2769
2580
|
args: ['attr.aria-label']
|
|
2770
|
-
}], id: [{
|
|
2771
|
-
type: Input
|
|
2772
|
-
}], images: [{
|
|
2773
|
-
type: Input
|
|
2774
|
-
}], config: [{
|
|
2775
|
-
type: Input
|
|
2776
|
-
}], clickImage: [{
|
|
2777
|
-
type: Output
|
|
2778
|
-
}], changeImage: [{
|
|
2779
|
-
type: Output
|
|
2780
|
-
}], firstImage: [{
|
|
2781
|
-
type: Output
|
|
2782
|
-
}], lastImage: [{
|
|
2783
|
-
type: Output
|
|
2784
2581
|
}], onMouseEnter: [{
|
|
2785
2582
|
type: HostListener,
|
|
2786
2583
|
args: ['mouseenter']
|
|
@@ -2898,37 +2695,50 @@ const KS_DEFAULT_BTN_FULL_SCREEN = {
|
|
|
2898
2695
|
* Also it emits click events as outputs.
|
|
2899
2696
|
*/
|
|
2900
2697
|
class UpperButtonsComponent extends AccessibleComponent {
|
|
2901
|
-
constructor(
|
|
2902
|
-
super();
|
|
2903
|
-
|
|
2698
|
+
constructor() {
|
|
2699
|
+
super(...arguments);
|
|
2700
|
+
/**
|
|
2701
|
+
* Unique id (>=0) of the current instance of this library. This is required when you are using
|
|
2702
|
+
* the service to call modal gallery.
|
|
2703
|
+
*/
|
|
2704
|
+
this.id = input.required(...(ngDevMode ? [{ debugName: "id" }] : []));
|
|
2705
|
+
/**
|
|
2706
|
+
* Object of type `Image` that represent the visible image.
|
|
2707
|
+
*/
|
|
2708
|
+
this.currentImage = input.required(...(ngDevMode ? [{ debugName: "currentImage" }] : []));
|
|
2709
|
+
/**
|
|
2710
|
+
* Object of type `ButtonsConfig` to init UpperButtonsComponent's features.
|
|
2711
|
+
* For instance, it contains an array of buttons.
|
|
2712
|
+
*/
|
|
2713
|
+
this.buttonsConfig = input.required(...(ngDevMode ? [{ debugName: "buttonsConfig" }] : []));
|
|
2904
2714
|
/**
|
|
2905
2715
|
* Output to emit clicks on refresh button. The payload contains a `ButtonEvent`.
|
|
2906
2716
|
*/
|
|
2907
|
-
this.refresh =
|
|
2717
|
+
this.refresh = output();
|
|
2908
2718
|
/**
|
|
2909
2719
|
* Output to emit clicks on delete button. The payload contains a `ButtonEvent`.
|
|
2910
2720
|
*/
|
|
2911
|
-
this.delete =
|
|
2721
|
+
this.delete = output();
|
|
2912
2722
|
/**
|
|
2913
2723
|
* Output to emit clicks on navigate button. The payload contains a `ButtonEvent`.
|
|
2914
2724
|
*/
|
|
2915
|
-
this.navigate =
|
|
2725
|
+
this.navigate = output();
|
|
2916
2726
|
/**
|
|
2917
2727
|
* Output to emit clicks on download button. The payload contains a `ButtonEvent`.
|
|
2918
2728
|
*/
|
|
2919
|
-
this.download =
|
|
2729
|
+
this.download = output();
|
|
2920
2730
|
/**
|
|
2921
2731
|
* Output to emit clicks on close button. The payload contains a `ButtonEvent`.
|
|
2922
2732
|
*/
|
|
2923
|
-
this.closeButton =
|
|
2733
|
+
this.closeButton = output();
|
|
2924
2734
|
/**
|
|
2925
2735
|
* Output to emit clicks on full-screen button. The payload contains a `ButtonEvent`.
|
|
2926
2736
|
*/
|
|
2927
|
-
this.fullscreen =
|
|
2737
|
+
this.fullscreen = output();
|
|
2928
2738
|
/**
|
|
2929
2739
|
* Output to emit clicks on all custom buttons. The payload contains a `ButtonEvent`.
|
|
2930
2740
|
*/
|
|
2931
|
-
this.customEmit =
|
|
2741
|
+
this.customEmit = output();
|
|
2932
2742
|
/**
|
|
2933
2743
|
* Default buttons array for standard configuration
|
|
2934
2744
|
*/
|
|
@@ -2957,12 +2767,10 @@ class UpperButtonsComponent extends AccessibleComponent {
|
|
|
2957
2767
|
* In particular, it's called only one time!!!
|
|
2958
2768
|
*/
|
|
2959
2769
|
ngOnInit() {
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
throw new Error('Internal library error - libConfig and buttonsConfig must be defined');
|
|
2770
|
+
if (!this.buttonsConfig()) {
|
|
2771
|
+
throw new Error('No buttons configured');
|
|
2963
2772
|
}
|
|
2964
|
-
this.buttonsConfig
|
|
2965
|
-
switch (this.buttonsConfig.strategy) {
|
|
2773
|
+
switch (this.buttonsConfig().strategy) {
|
|
2966
2774
|
case ButtonsStrategy.SIMPLE:
|
|
2967
2775
|
this.buttons = this.addButtonIds(this.simpleButtonsDefault);
|
|
2968
2776
|
break;
|
|
@@ -2973,7 +2781,7 @@ class UpperButtonsComponent extends AccessibleComponent {
|
|
|
2973
2781
|
this.buttons = this.addButtonIds(this.fullButtonsDefault);
|
|
2974
2782
|
break;
|
|
2975
2783
|
case ButtonsStrategy.CUSTOM:
|
|
2976
|
-
this.buttons = this.addButtonIds(this.validateCustomButtons(this.buttonsConfig.buttons));
|
|
2784
|
+
this.buttons = this.addButtonIds(this.validateCustomButtons(this.buttonsConfig().buttons));
|
|
2977
2785
|
break;
|
|
2978
2786
|
case ButtonsStrategy.DEFAULT:
|
|
2979
2787
|
default:
|
|
@@ -2999,14 +2807,15 @@ class UpperButtonsComponent extends AccessibleComponent {
|
|
|
2999
2807
|
// (I'll fill this value inside the parent of this component
|
|
3000
2808
|
image: null,
|
|
3001
2809
|
action,
|
|
3002
|
-
galleryId: this.id
|
|
2810
|
+
galleryId: this.id()
|
|
3003
2811
|
};
|
|
2812
|
+
const currentImage = this.currentImage();
|
|
3004
2813
|
switch (button.type) {
|
|
3005
2814
|
case ButtonType.DELETE:
|
|
3006
2815
|
this.triggerOnMouseAndKeyboard(this.delete, event, dataToEmit);
|
|
3007
2816
|
break;
|
|
3008
2817
|
case ButtonType.EXTURL:
|
|
3009
|
-
if (!
|
|
2818
|
+
if (!currentImage || !currentImage.modal || !currentImage.modal.extUrl) {
|
|
3010
2819
|
return;
|
|
3011
2820
|
}
|
|
3012
2821
|
this.triggerOnMouseAndKeyboard(this.navigate, event, dataToEmit);
|
|
@@ -3066,7 +2875,7 @@ class UpperButtonsComponent extends AccessibleComponent {
|
|
|
3066
2875
|
* Private method to validate custom buttons received as input.
|
|
3067
2876
|
* @param buttons ButtonConfig[] config array. [] by default.
|
|
3068
2877
|
* @returns ButtonConfig[] the same input buttons config array
|
|
3069
|
-
* @throws an error
|
|
2878
|
+
* @throws an error if exists a button with an unknown type
|
|
3070
2879
|
*/
|
|
3071
2880
|
validateCustomButtons(buttons = []) {
|
|
3072
2881
|
buttons.forEach((val) => {
|
|
@@ -3077,31 +2886,13 @@ class UpperButtonsComponent extends AccessibleComponent {
|
|
|
3077
2886
|
});
|
|
3078
2887
|
return buttons;
|
|
3079
2888
|
}
|
|
3080
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: UpperButtonsComponent, deps:
|
|
3081
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.7", type: UpperButtonsComponent, isStandalone: true, selector: "ks-upper-buttons", inputs: { id: "id", currentImage: "currentImage" }, outputs: { refresh: "refresh", delete: "delete", navigate: "navigate", download: "download", closeButton: "closeButton", fullscreen: "fullscreen", customEmit: "customEmit" }, usesInheritance: true, ngImport: i0, template: "<header class=\"buttons-container\">\n\n @if (!buttonsConfig || buttonsConfig?.visible) {\n @for (btn of buttons; track trackById) {\n <a class=\"upper-button\"\n ksSize [sizeConfig]=\"{width: btn.size?.width!, height: btn.size?.height!}\"\n [ngStyle]=\"{'font-size': btn.fontSize}\"\n [attr.aria-label]=\"btn.ariaLabel\"\n [tabIndex]=\"0\" role=\"button\"\n (click)=\"onEvent(btn, $event)\" (keyup)=\"onEvent(btn, $event)\">\n <div class=\"inside {{btn.className}}\" aria-hidden=\"true\" title=\"{{btn.title}}\"></div>\n </a>\n }\n }\n</header>\n", styles: [".buttons-container{display:flex;flex-direction:row;justify-content:flex-end}.buttons-container>.upper-button{align-self:center;margin-right:30px;margin-top:28px;font-size:50px;text-decoration:none;cursor:pointer;animation:animatezoom .6s;color:#fff}@keyframes animatezoom{0%{transform:scale(0)}to{transform:scale(1)}}.base-btn,.copy,.refresh-image,.close-image,.download-image,.ext-url-image,.delete-image,.fullscreen-image,.rotate-image{width:30px;height:30px;background-size:30px;opacity:.8;transition:all .5s}.base-btn:hover,.copy:hover,.refresh-image:hover,.close-image:hover,.download-image:hover,.ext-url-image:hover,.delete-image:hover,.fullscreen-image:hover,.rotate-image:hover{transform:scale(1.2)}.rotate-image{background-image:url(data:image/svg+xml;base64,PD94bWwgd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nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48L3N2Zz4=)}\n"], dependencies: [{ kind: "directive", type: SizeDirective, selector: "[ksSize]", inputs: ["sizeConfig"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2889
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: UpperButtonsComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
2890
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.7", type: UpperButtonsComponent, isStandalone: true, selector: "ks-upper-buttons", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: true, transformFunction: null }, currentImage: { classPropertyName: "currentImage", publicName: "currentImage", isSignal: true, isRequired: true, transformFunction: null }, buttonsConfig: { classPropertyName: "buttonsConfig", publicName: "buttonsConfig", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { refresh: "refresh", delete: "delete", navigate: "navigate", download: "download", closeButton: "closeButton", fullscreen: "fullscreen", customEmit: "customEmit" }, usesInheritance: true, ngImport: i0, template: "<header class=\"buttons-container\">\n\n @if (!buttonsConfig() || buttonsConfig()?.visible) {\n @for (btn of buttons; track trackById) {\n <a class=\"upper-button\"\n ksSize [sizeConfig]=\"{width: btn.size?.width!, height: btn.size?.height!}\"\n [ngStyle]=\"{'font-size': btn.fontSize}\"\n [attr.aria-label]=\"btn.ariaLabel\"\n [tabIndex]=\"0\" role=\"button\"\n (click)=\"onEvent(btn, $event)\" (keyup)=\"onEvent(btn, $event)\">\n <div class=\"inside {{btn.className}}\" aria-hidden=\"true\" title=\"{{btn.title}}\"></div>\n </a>\n }\n }\n</header>\n", styles: [".buttons-container{display:flex;flex-direction:row;justify-content:flex-end}.buttons-container>.upper-button{align-self:center;margin-right:30px;margin-top:28px;font-size:50px;text-decoration:none;cursor:pointer;animation:animatezoom .6s;color:#fff}@keyframes animatezoom{0%{transform:scale(0)}to{transform:scale(1)}}.base-btn,.copy,.refresh-image,.close-image,.download-image,.ext-url-image,.delete-image,.fullscreen-image,.rotate-image{width:30px;height:30px;background-size:30px;opacity:.8;transition:all .5s}.base-btn:hover,.copy:hover,.refresh-image:hover,.close-image:hover,.download-image:hover,.ext-url-image:hover,.delete-image:hover,.fullscreen-image:hover,.rotate-image:hover{transform:scale(1.2)}.rotate-image{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/PjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4PSIwcHgiIHk9IjBweCIgdmlld0JveD0iMCAwIDY0IDY0IiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA2NCA2NDsiIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSI1MTJweCIgaGVpZ2h0PSI1MTJweCI+PGc+PGc+PHBhdGggZD0iTTMzLDJjNy43NDYsMCwxNS4wMjgsMy4wMTcsMjAuNTA1LDguNDk0YzEwLjEzOCwxMC4xMzcsMTEuMzEsMjYuMzk2LDIuNzQsMzcuODQ5TDUyLDUyLjU4OVY0NGgtMnYxMWwxLDFoMTF2LTJoLTguNTgyICAgIGw0LjI5Mi00LjI5M2wwLjA5Mi0wLjEwNmM5LjIxMS0xMi4yNDcsNy45NzItMjkuNjY3LTIuODgzLTQwLjUyMUM0OS4wNjQsMy4yMjUsNDEuMjgsMCwzMywwVjJ6IiBmaWxsPSIjRkZGRkZGIi8+PHBhdGggZD0iTTcuNzU1LDE1LjY1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LjUtMTMuNWMwLTYuNCw1LjItMTEuNiwxMS42LTExLjZoMjI3ICAgIGM2LjQsMCwxMS42LDUuMiwxMS42LDExLjZ2MzI1LjdjMCw2LjQtNS4yLDExLjYtMTEuNiwxMS42Yy03LjUsMC0xMy41LDYtMTMuNSwxMy41czYsMTMuNSwxMy41LDEzLjVjMjEuMywwLDM4LjYtMTcuMywzOC42LTM4LjYgICAgVjM4LjZDNDM5LjY1LDE3LjMsNDIyLjM1LDAsNDAxLjA1LDB6IiBmaWxsPSIjRkZGRkZGIi8+PC9nPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48L3N2Zz4=)}\n"], dependencies: [{ kind: "directive", type: SizeDirective, selector: "[ksSize]", inputs: ["sizeConfig"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3082
2891
|
}
|
|
3083
2892
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: UpperButtonsComponent, decorators: [{
|
|
3084
2893
|
type: Component,
|
|
3085
|
-
args: [{ selector: 'ks-upper-buttons', changeDetection: ChangeDetectionStrategy.OnPush, imports: [SizeDirective, NgStyle], template: "<header class=\"buttons-container\">\n\n @if (!buttonsConfig || buttonsConfig?.visible) {\n @for (btn of buttons; track trackById) {\n <a class=\"upper-button\"\n ksSize [sizeConfig]=\"{width: btn.size?.width!, height: btn.size?.height!}\"\n [ngStyle]=\"{'font-size': btn.fontSize}\"\n [attr.aria-label]=\"btn.ariaLabel\"\n [tabIndex]=\"0\" role=\"button\"\n (click)=\"onEvent(btn, $event)\" (keyup)=\"onEvent(btn, $event)\">\n <div class=\"inside {{btn.className}}\" aria-hidden=\"true\" title=\"{{btn.title}}\"></div>\n </a>\n }\n }\n</header>\n", styles: [".buttons-container{display:flex;flex-direction:row;justify-content:flex-end}.buttons-container>.upper-button{align-self:center;margin-right:30px;margin-top:28px;font-size:50px;text-decoration:none;cursor:pointer;animation:animatezoom .6s;color:#fff}@keyframes animatezoom{0%{transform:scale(0)}to{transform:scale(1)}}.base-btn,.copy,.refresh-image,.close-image,.download-image,.ext-url-image,.delete-image,.fullscreen-image,.rotate-image{width:30px;height:30px;background-size:30px;opacity:.8;transition:all .5s}.base-btn:hover,.copy:hover,.refresh-image:hover,.close-image:hover,.download-image:hover,.ext-url-image:hover,.delete-image:hover,.fullscreen-image:hover,.rotate-image:hover{transform:scale(1.2)}.rotate-image{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/PjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4PSIwcHgiIHk9IjBweCIgdmlld0JveD0iMCAwIDY0IDY0IiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA2NCA2NDsiIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSI1MTJweCIgaGVpZ2h0PSI1MTJweCI+PGc+PGc+PHBhdGggZD0iTTMzLDJjNy43NDYsMCwxNS4wMjgsMy4wMTcsMjAuNTA1LDguNDk0YzEwLjEzOCwxMC4xMzcsMTEuMzEsMjYuMzk2LDIuNzQsMzcuODQ5TDUyLDUyLjU4OVY0NGgtMnYxMWwxLDFoMTF2LTJoLTguNTgyICAgIGw0LjI5Mi00LjI5M2wwLjA5Mi0wLjEwNmM5LjIxMS0xMi4yNDcsNy45NzItMjkuNjY3LTIuODgzLTQwLjUyMUM0OS4wNjQsMy4yMjUsNDEuMjgsMC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C42LDE3LjMtMzguNiwzOC42YzAsNy41LDYsMTMuNSwxMy41LDEzLjVzMTMuNS02LDEzLjUtMTMuNWMwLTYuNCw1LjItMTEuNiwxMS42LTExLjZoMjI3ICAgIGM2LjQsMCwxMS42LDUuMiwxMS42LDExLjZ2MzI1LjdjMCw2LjQtNS4yLDExLjYtMTEuNiwxMS42Yy03LjUsMC0xMy41LDYtMTMuNSwxMy41czYsMTMuNSwxMy41LDEzLjVjMjEuMywwLDM4LjYtMTcuMywzOC42LTM4LjYgICAgVjM4LjZDNDM5LjY1LDE3LjMsNDIyLjM1LDAsNDAxLjA1LDB6IiBmaWxsPSIjRkZGRkZGIi8+PC9nPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48L3N2Zz4=)}\n"] }]
|
|
3086
|
-
}]
|
|
3087
|
-
type: Input
|
|
3088
|
-
}], currentImage: [{
|
|
3089
|
-
type: Input
|
|
3090
|
-
}], refresh: [{
|
|
3091
|
-
type: Output
|
|
3092
|
-
}], delete: [{
|
|
3093
|
-
type: Output
|
|
3094
|
-
}], navigate: [{
|
|
3095
|
-
type: Output
|
|
3096
|
-
}], download: [{
|
|
3097
|
-
type: Output
|
|
3098
|
-
}], closeButton: [{
|
|
3099
|
-
type: Output
|
|
3100
|
-
}], fullscreen: [{
|
|
3101
|
-
type: Output
|
|
3102
|
-
}], customEmit: [{
|
|
3103
|
-
type: Output
|
|
3104
|
-
}] } });
|
|
2894
|
+
args: [{ selector: 'ks-upper-buttons', changeDetection: ChangeDetectionStrategy.OnPush, imports: [SizeDirective, NgStyle], template: "<header class=\"buttons-container\">\n\n @if (!buttonsConfig() || buttonsConfig()?.visible) {\n @for (btn of buttons; track trackById) {\n <a class=\"upper-button\"\n ksSize [sizeConfig]=\"{width: btn.size?.width!, height: btn.size?.height!}\"\n [ngStyle]=\"{'font-size': btn.fontSize}\"\n [attr.aria-label]=\"btn.ariaLabel\"\n [tabIndex]=\"0\" role=\"button\"\n (click)=\"onEvent(btn, $event)\" (keyup)=\"onEvent(btn, $event)\">\n <div class=\"inside {{btn.className}}\" aria-hidden=\"true\" title=\"{{btn.title}}\"></div>\n </a>\n }\n }\n</header>\n", styles: [".buttons-container{display:flex;flex-direction:row;justify-content:flex-end}.buttons-container>.upper-button{align-self:center;margin-right:30px;margin-top:28px;font-size:50px;text-decoration:none;cursor:pointer;animation:animatezoom .6s;color:#fff}@keyframes animatezoom{0%{transform:scale(0)}to{transform:scale(1)}}.base-btn,.copy,.refresh-image,.close-image,.download-image,.ext-url-image,.delete-image,.fullscreen-image,.rotate-image{width:30px;height:30px;background-size:30px;opacity:.8;transition:all .5s}.base-btn:hover,.copy:hover,.refresh-image:hover,.close-image:hover,.download-image:hover,.ext-url-image:hover,.delete-image:hover,.fullscreen-image:hover,.rotate-image:hover{transform:scale(1.2)}.rotate-image{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/PjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4PSIwcHgiIHk9IjBweCIgdmlld0JveD0iMCAwIDY0IDY0IiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA2NCA2NDsiIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSI1MTJweCIgaGVpZ2h0PSI1MTJweCI+PGc+PGc+PHBhdGggZD0iTTMzLDJjNy43NDYsMCwxNS4wMjgsMy4wMTcsMjAuNTA1LDguNDk0YzEwLjEzOCwxMC4xMzcsMTEuMzEsMjYuMzk2LDIuNzQsMzcuODQ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EuNi0xMS42VjEyNCAgICBjMC02LjQsNS4yLTExLjYsMTEuNi0xMS42aDIyN2M2LjQsMCwxMS42LDUuMiwxMS42LDExLjZWNDQ5LjZ6IiBmaWxsPSIjRkZGRkZGIi8+PHBhdGggZD0iTTQwMS4wNSwwaC0yMjdjLTIxLjMsMC0zOC42LDE3LjMtMzguNiwzOC42YzAsNy41LDYsMTMuNSwxMy41LDEzLjVzMTMuNS02LDEzLjUtMTMuNWMwLTYuNCw1LjItMTEuNiwxMS42LTExLjZoMjI3ICAgIGM2LjQsMCwxMS42LDUuMiwxMS42LDExLjZ2MzI1LjdjMCw2LjQtNS4yLDExLjYtMTEuNiwxMS42Yy03LjUsMC0xMy41LDYtMTMuNSwxMy41czYsMTMuNSwxMy41LDEzLjVjMjEuMywwLDM4LjYtMTcuMywzOC42LTM4LjYgICAgVjM4LjZDNDM5LjY1LDE3LjMsNDIyLjM1LDAsNDAxLjA1LDB6IiBmaWxsPSIjRkZGRkZGIi8+PC9nPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48L3N2Zz4=)}\n"] }]
|
|
2895
|
+
}] });
|
|
3105
2896
|
|
|
3106
2897
|
/*
|
|
3107
2898
|
The MIT License (MIT)
|
|
@@ -3130,13 +2921,33 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImpor
|
|
|
3130
2921
|
* Component with image previews
|
|
3131
2922
|
*/
|
|
3132
2923
|
class PreviewsComponent extends AccessibleComponent {
|
|
3133
|
-
constructor(
|
|
3134
|
-
super();
|
|
3135
|
-
|
|
2924
|
+
constructor() {
|
|
2925
|
+
super(...arguments);
|
|
2926
|
+
/**
|
|
2927
|
+
* Unique id (>=0) of the current instance of this library. This is required when you are using
|
|
2928
|
+
* the service to call modal-gallery.
|
|
2929
|
+
*/
|
|
2930
|
+
this.id = input.required(...(ngDevMode ? [{ debugName: "id" }] : []));
|
|
2931
|
+
/**
|
|
2932
|
+
* Object of type `Image` that represent the visible image.
|
|
2933
|
+
*/
|
|
2934
|
+
this.currentImage = input.required(...(ngDevMode ? [{ debugName: "currentImage" }] : []));
|
|
2935
|
+
/**
|
|
2936
|
+
* Array of `Image` that represent the model of this library with all images,
|
|
2937
|
+
* thumbs and so on.
|
|
2938
|
+
*/
|
|
2939
|
+
this.images = input.required(...(ngDevMode ? [{ debugName: "images" }] : []));
|
|
2940
|
+
/**
|
|
2941
|
+
* Optional template reference for the rendering of previews.
|
|
2942
|
+
* Template may access the following context variables:
|
|
2943
|
+
* - preview: the `Image` object
|
|
2944
|
+
* - defaultTemplate: the template used by default to render the preview (in case the need is to wrap it)
|
|
2945
|
+
*/
|
|
2946
|
+
this.customTemplate = input(...(ngDevMode ? [undefined, { debugName: "customTemplate" }] : []));
|
|
3136
2947
|
/**
|
|
3137
2948
|
* Output to emit the clicked preview. The payload contains the `ImageEvent` associated to the clicked preview.
|
|
3138
2949
|
*/
|
|
3139
|
-
this.clickPreview =
|
|
2950
|
+
this.clickPreview = output();
|
|
3140
2951
|
/**
|
|
3141
2952
|
* Enum of type `Action` that represents a mouse click on a button.
|
|
3142
2953
|
* Declared here to be used inside the template.
|
|
@@ -3148,11 +2959,12 @@ class PreviewsComponent extends AccessibleComponent {
|
|
|
3148
2959
|
*/
|
|
3149
2960
|
this.keyboardAction = Action.KEYBOARD;
|
|
3150
2961
|
/**
|
|
3151
|
-
* Array of `
|
|
2962
|
+
* Array of `Image` exposed to the template. This field is initialized
|
|
3152
2963
|
* applying transformations, default values and so on to the input of the same type.
|
|
3153
2964
|
*/
|
|
3154
2965
|
this.previews = [];
|
|
3155
2966
|
this.defaultPreviewSize = DEFAULT_PREVIEW_SIZE;
|
|
2967
|
+
this.configService = inject(ConfigService);
|
|
3156
2968
|
}
|
|
3157
2969
|
/**
|
|
3158
2970
|
* Method ´ngOnInit´ to build `configPreview` applying a default value and also to
|
|
@@ -3161,25 +2973,25 @@ class PreviewsComponent extends AccessibleComponent {
|
|
|
3161
2973
|
* In particular, it's called only one time!!!
|
|
3162
2974
|
*/
|
|
3163
2975
|
ngOnInit() {
|
|
3164
|
-
const libConfig = this.configService.getConfig(this.id);
|
|
2976
|
+
const libConfig = this.configService.getConfig(this.id());
|
|
3165
2977
|
if (!libConfig) {
|
|
3166
2978
|
throw new Error('Internal library error - libConfig must be defined');
|
|
3167
2979
|
}
|
|
3168
2980
|
this.accessibilityConfig = libConfig.accessibilityConfig;
|
|
3169
2981
|
this.slideConfig = libConfig.slideConfig;
|
|
3170
2982
|
this.previewConfig = libConfig.previewConfig;
|
|
3171
|
-
this.initPreviews(this.currentImage, this.images);
|
|
2983
|
+
this.initPreviews(this.currentImage(), this.images());
|
|
3172
2984
|
}
|
|
3173
2985
|
/**
|
|
3174
2986
|
* Method to check if an image is active (i.e. a preview image).
|
|
3175
|
-
* @param preview
|
|
2987
|
+
* @param preview Image is an image to check if it's active or not
|
|
3176
2988
|
* @returns boolean true if is active, false otherwise
|
|
3177
2989
|
*/
|
|
3178
2990
|
isActive(preview) {
|
|
3179
2991
|
if (!preview) {
|
|
3180
2992
|
return false;
|
|
3181
2993
|
}
|
|
3182
|
-
return preview.id === this.currentImage.id;
|
|
2994
|
+
return preview.id === this.currentImage().id;
|
|
3183
2995
|
}
|
|
3184
2996
|
/**
|
|
3185
2997
|
* Method ´ngOnChanges´ to update `previews` array.
|
|
@@ -3188,8 +3000,8 @@ class PreviewsComponent extends AccessibleComponent {
|
|
|
3188
3000
|
* In particular, it's called when any data-bound property of a directive changes!!!
|
|
3189
3001
|
*/
|
|
3190
3002
|
ngOnChanges(changes) {
|
|
3191
|
-
let currentImage = changes['currentImage']?.currentValue ?? this.currentImage;
|
|
3192
|
-
let images = changes['images']?.currentValue ?? this.images;
|
|
3003
|
+
let currentImage = changes['currentImage']?.currentValue ?? this.currentImage();
|
|
3004
|
+
let images = changes['images']?.currentValue ?? this.images();
|
|
3193
3005
|
if (this.previewConfig && currentImage && images) {
|
|
3194
3006
|
this.initPreviews(currentImage, images);
|
|
3195
3007
|
}
|
|
@@ -3197,7 +3009,7 @@ class PreviewsComponent extends AccessibleComponent {
|
|
|
3197
3009
|
/**
|
|
3198
3010
|
* Method called by events from both keyboard and mouse on a preview.
|
|
3199
3011
|
* This will trigger the `clickpreview` output with the input preview as its payload.
|
|
3200
|
-
* @param preview
|
|
3012
|
+
* @param preview Image that triggered this method
|
|
3201
3013
|
* @param event KeyboardEvent | MouseEvent payload
|
|
3202
3014
|
* @param action Action that triggered the source event or `Action.NORMAL` if not specified
|
|
3203
3015
|
*/
|
|
@@ -3210,7 +3022,7 @@ class PreviewsComponent extends AccessibleComponent {
|
|
|
3210
3022
|
}
|
|
3211
3023
|
const result = super.handleImageEvent(event);
|
|
3212
3024
|
if (result === NEXT || result === PREV) {
|
|
3213
|
-
this.clickPreview.emit(new ImageModalEvent(this.id, action, getIndex(preview, this.images)));
|
|
3025
|
+
this.clickPreview.emit(new ImageModalEvent(this.id(), action, getIndex(preview, this.images())));
|
|
3214
3026
|
}
|
|
3215
3027
|
}
|
|
3216
3028
|
/**
|
|
@@ -3235,7 +3047,8 @@ class PreviewsComponent extends AccessibleComponent {
|
|
|
3235
3047
|
*/
|
|
3236
3048
|
isDisplayLeftPreviewsArrow() {
|
|
3237
3049
|
// Don't show arrows if the preview number is greater or equals than total number of images
|
|
3238
|
-
|
|
3050
|
+
const images = this.images();
|
|
3051
|
+
if (this.previewConfig?.number !== undefined && images && this.previewConfig?.number >= images?.length) {
|
|
3239
3052
|
return false;
|
|
3240
3053
|
}
|
|
3241
3054
|
return (this.previewConfig?.arrows && this.start > 0) || !!this.slideConfig?.infinite;
|
|
@@ -3246,16 +3059,17 @@ class PreviewsComponent extends AccessibleComponent {
|
|
|
3246
3059
|
*/
|
|
3247
3060
|
isDisplayRightPreviewsArrow() {
|
|
3248
3061
|
// Don't show arrows if the preview number is greater or equals than total number of images
|
|
3249
|
-
|
|
3062
|
+
const images = this.images();
|
|
3063
|
+
if (this.previewConfig?.number !== undefined && images && this.previewConfig?.number >= images?.length) {
|
|
3250
3064
|
return false;
|
|
3251
3065
|
}
|
|
3252
|
-
return (this.previewConfig?.arrows &&
|
|
3066
|
+
return (this.previewConfig?.arrows && images && this.end < images.length) || !!this.slideConfig?.infinite;
|
|
3253
3067
|
}
|
|
3254
3068
|
/**
|
|
3255
3069
|
* Private method to init previews based on the currentImage and the full array of images.
|
|
3256
3070
|
* The current image in mandatory to show always the current preview (as highlighted).
|
|
3257
|
-
* @param currentImage
|
|
3258
|
-
* @param images
|
|
3071
|
+
* @param currentImage Image to decide how to show previews, because I always want to see the current image as highlighted
|
|
3072
|
+
* @param images Image[] is the array of all images.
|
|
3259
3073
|
*/
|
|
3260
3074
|
initPreviews(currentImage, images) {
|
|
3261
3075
|
this.setIndexesPreviews(currentImage, images);
|
|
@@ -3292,7 +3106,7 @@ class PreviewsComponent extends AccessibleComponent {
|
|
|
3292
3106
|
if (!this.previewConfig) {
|
|
3293
3107
|
throw new Error('Internal library error - previewConfig must be defined');
|
|
3294
3108
|
}
|
|
3295
|
-
if (this.end >= this.images.length) {
|
|
3109
|
+
if (this.end >= this.images().length) {
|
|
3296
3110
|
// check if nextImage should be blocked
|
|
3297
3111
|
const preventSliding = !!this.slideConfig && this.slideConfig.infinite === false;
|
|
3298
3112
|
if (preventSliding) {
|
|
@@ -3303,8 +3117,8 @@ class PreviewsComponent extends AccessibleComponent {
|
|
|
3303
3117
|
else {
|
|
3304
3118
|
this.start++;
|
|
3305
3119
|
}
|
|
3306
|
-
this.end = this.start + Math.min(this.previewConfig.number, this.images.length);
|
|
3307
|
-
this.previews = this.images.filter((img, i) => i >= this.start && i < this.end);
|
|
3120
|
+
this.end = this.start + Math.min(this.previewConfig.number, this.images().length);
|
|
3121
|
+
this.previews = this.images().filter((img, i) => i >= this.start && i < this.end);
|
|
3308
3122
|
}
|
|
3309
3123
|
/**
|
|
3310
3124
|
* Private method to update the visible previews navigating to the left (previous).
|
|
@@ -3319,31 +3133,21 @@ class PreviewsComponent extends AccessibleComponent {
|
|
|
3319
3133
|
if (preventSliding) {
|
|
3320
3134
|
return;
|
|
3321
3135
|
}
|
|
3322
|
-
this.end = this.images.length;
|
|
3136
|
+
this.end = this.images().length;
|
|
3323
3137
|
}
|
|
3324
3138
|
else {
|
|
3325
3139
|
this.end--;
|
|
3326
3140
|
}
|
|
3327
|
-
this.start = this.end - Math.min(this.previewConfig.number, this.images.length);
|
|
3328
|
-
this.previews = this.images.filter((img, i) => i >= this.start && i < this.end);
|
|
3141
|
+
this.start = this.end - Math.min(this.previewConfig.number, this.images().length);
|
|
3142
|
+
this.previews = this.images().filter((img, i) => i >= this.start && i < this.end);
|
|
3329
3143
|
}
|
|
3330
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: PreviewsComponent, deps:
|
|
3331
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.7", type: PreviewsComponent, isStandalone: true, selector: "ks-previews", inputs: { id: "id", currentImage: "currentImage", images: "images", customTemplate: "customTemplate" }, outputs: { clickPreview: "clickPreview" }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<nav class=\"previews-container\"\n [class.mobile-visible]=\"previewConfig?.mobileVisible\"\n [attr.aria-label]=\"accessibilityConfig?.previewsContainerAriaLabel\"\n [title]=\"accessibilityConfig?.previewsContainerTitle\">\n\n @if (previewConfig?.visible) {\n <a class=\"nav-left\"\n [attr.aria-label]=\"accessibilityConfig?.previewScrollPrevAriaLabel\"\n [tabIndex]=\"isDisplayLeftPreviewsArrow() ? 0 : -1\" role=\"button\"\n (click)=\"onNavigationEvent('left', $event)\" (keyup)=\"onNavigationEvent('left', $event)\">\n <div class=\"inside {{ isDisplayLeftPreviewsArrow() ? 'left-arrow-preview-image' : 'empty-arrow-preview-image'}}\"\n aria-hidden=\"true\"\n [title]=\"accessibilityConfig?.previewScrollPrevTitle\"></div>\n </a>\n\n @for (preview of previews; track preview.id) {\n <div class=\"preview-container {{!previewConfig?.clickable ? ' unclickable' : ''}}\"\n (click)=\"onImageEvent(preview, $event, clickAction)\"\n (keyup)=\"onImageEvent(preview, $event, keyboardAction)\"\n >\n <ng-container
|
|
3144
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: PreviewsComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
3145
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.7", type: PreviewsComponent, isStandalone: true, selector: "ks-previews", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: true, transformFunction: null }, currentImage: { classPropertyName: "currentImage", publicName: "currentImage", isSignal: true, isRequired: true, transformFunction: null }, images: { classPropertyName: "images", publicName: "images", isSignal: true, isRequired: true, transformFunction: null }, customTemplate: { classPropertyName: "customTemplate", publicName: "customTemplate", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { clickPreview: "clickPreview" }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<nav class=\"previews-container\"\n [class.mobile-visible]=\"previewConfig?.mobileVisible\"\n [attr.aria-label]=\"accessibilityConfig?.previewsContainerAriaLabel\"\n [title]=\"accessibilityConfig?.previewsContainerTitle\">\n\n @if (previewConfig?.visible) {\n <a class=\"nav-left\"\n [attr.aria-label]=\"accessibilityConfig?.previewScrollPrevAriaLabel\"\n [tabIndex]=\"isDisplayLeftPreviewsArrow() ? 0 : -1\" role=\"button\"\n (click)=\"onNavigationEvent('left', $event)\" (keyup)=\"onNavigationEvent('left', $event)\">\n <div class=\"inside {{ isDisplayLeftPreviewsArrow() ? 'left-arrow-preview-image' : 'empty-arrow-preview-image'}}\"\n aria-hidden=\"true\"\n [title]=\"accessibilityConfig?.previewScrollPrevTitle\"></div>\n </a>\n\n @for (preview of previews; track preview.id) {\n <div class=\"preview-container {{!previewConfig?.clickable ? ' unclickable' : ''}}\"\n (click)=\"onImageEvent(preview, $event, clickAction)\"\n (keyup)=\"onImageEvent(preview, $event, keyboardAction)\"\n >\n <ng-container *ngTemplateOutlet=\"!customTemplate() ? defaultTemplate : customTemplate() ; context:{preview, defaultTemplate}\" />\n <ng-template #defaultTemplate>\n @if (preview?.modal?.img) {\n <img class=\"inside preview-image {{isActive(preview) ? 'active' : ''}}\"\n loading=\"{{preview.loading}}\"\n [attr.fetchpriority]=\"preview.fetchpriority\"\n [src]=\"preview.plain?.img ? preview.plain?.img! : preview.modal.img\"\n ksFallbackImage [fallbackImg]=\"preview.plain?.fallbackImg ? preview.plain?.fallbackImg : preview.modal.fallbackImg\"\n ksSize [sizeConfig]=\"{width: previewConfig?.size ? previewConfig?.size?.width! : defaultPreviewSize.width,\n height: previewConfig?.size ? previewConfig?.size?.height! : defaultPreviewSize.height}\"\n [attr.aria-label]=\"preview.modal.ariaLabel ? preview.modal.ariaLabel : ''\"\n [title]=\"(preview.modal.title || preview.modal.title === '') ? preview.modal.title : ''\"\n alt=\"{{preview.modal.alt ? preview.modal.alt : ''}}\"\n [tabIndex]=\"0\" role=\"img\"\n />\n }\n </ng-template>\n </div>\n }\n\n\n <a class=\"nav-right\"\n [attr.aria-label]=\"accessibilityConfig?.previewScrollNextAriaLabel\"\n [tabIndex]=\"isDisplayRightPreviewsArrow() ? 0 : -1\" role=\"button\"\n (click)=\"onNavigationEvent('right', $event)\" (keyup)=\"onNavigationEvent('right', $event)\">\n <div class=\"inside {{ isDisplayRightPreviewsArrow() ? 'right-arrow-preview-image' : 'empty-arrow-preview-image'}}\"\n aria-hidden=\"true\"\n [title]=\"accessibilityConfig?.previewScrollNextTitle\"></div>\n </a>\n }\n</nav>\n", styles: ["@media only screen and (max-width: 767px),only screen and (max-device-width: 767px){.previews-container{display:none}.previews-container>.preview-image{display:none}.previews-container>.nav-left{display:none}.previews-container>.nav-right{display:none}.previews-container.mobile-visible{align-items:center;animation:fadein-semi-visible08 .8s;display:flex;flex-direction:row;justify-content:center;margin-bottom:15px}.previews-container.mobile-visible>.nav-left{display:flex}.previews-container.mobile-visible>.nav-right{display:flex}.previews-container.mobile-visible>.preview-image{cursor:pointer;display:flex;margin-left:2px;margin-right:2px;opacity:.7;height:50px}.previews-container.mobile-visible>.preview-image.active{opacity:1}.previews-container.mobile-visible>.preview-image.unclickable{cursor:not-allowed}.previews-container.mobile-visible>.preview-image:hover{opacity:1;transition:all .5s ease;transition-property:opacity}}@media only screen and (min-device-width: 768px){.previews-container{align-items:center;animation:fadein-semi-visible08 .8s;display:flex;flex-direction:row;justify-content:center;margin-bottom:15px}.previews-container .preview-container{margin-left:2px;margin-right:2px;cursor:pointer}.previews-container .preview-container.unclickable{cursor:not-allowed}.previews-container .preview-container .preview-image{opacity:.7;height:50px}.previews-container .preview-container .preview-image.active{opacity:1}.previews-container .preview-container .preview-image:hover{opacity:1;transition:all .5s ease;transition-property:opacity}.previews-container .nav,.previews-container>.nav-right,.previews-container>.nav-left{color:#919191;cursor:pointer;transition:all .5s}.previews-container .nav:hover,.previews-container>.nav-right:hover,.previews-container>.nav-left:hover{transform:scale(1.1)}.previews-container>.nav-left{margin-right:10px}.previews-container>.nav-right{margin-left:10px}}@keyframes fadein-visible{0%{opacity:0}to{opacity:1}}@keyframes fadein-semi-visible05{0%{opacity:0}to{opacity:.5}}@keyframes fadein-semi-visible08{0%{opacity:0}to{opacity:.8}}@keyframes fadein-semi-visible09{0%{opacity:0}to{opacity:.9}}\n", ".arrow-preview-image,.right-arrow-preview-image,.left-arrow-preview-image,.empty-arrow-preview-image{width:15px;height:15px;opacity:.5}.empty-arrow-preview-image{background:#000;opacity:0}.left-arrow-preview-image{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/PjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4PSIwcHgiIHk9IjBweCIgdmlld0JveD0iMCAwIDQ3Ny4xNzUgNDc3LjE3NSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgNDc3LjE3NSA0NzcuMTc1OyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIgd2lkdGg9IjUxMnB4IiBoZWlnaHQ9IjUxMnB4Ij48Zz48cGF0aCBkPSJNMTQ1LjE4OCwyMzguNTc1bDIxNS41LTIxNS41YzUuMy01LjMsNS4zLTEzLjgsMC0xOS4xcy0xMy44LTUuMy0xOS4xLDBsLTIyNS4xLDIyNS4xYy01LjMsNS4zLTUuMywxMy44LDAsMTkuMWwyMjUuMSwyMjUgICBjMi42LDIuNiw2LjEsNCw5LjUsNHM2LjktMS4zLDkuNS00YzUuMy01LjMsNS4zLTEzLjgsMC0xOS4xTDE0NS4xODgsMjM4LjU3NXoiIGZpbGw9IiNGRkZGRkYiLz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PC9zdmc+);background-size:15px;transition:all .5s}.left-arrow-preview-image:hover{transform:scale(1.2)}.right-arrow-preview-image{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/PjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4PSIwcHgiIHk9IjBweCIgdmlld0JveD0iMCAwIDQ3Ny4xNzUgNDc3LjE3NSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgNDc3LjE3NSA0NzcuMTc1OyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIgd2lkdGg9IjUxMnB4IiBoZWlnaHQ9IjUxMnB4Ij48Zz48cGF0aCBkPSJNMzYwLjczMSwyMjkuMDc1bC0yMjUuMS0yMjUuMWMtNS4zLTUuMy0xMy44LTUuMy0xOS4xLDBzLTUuMywxMy44LDAsMTkuMWwyMTUuNSwyMTUuNWwtMjE1LjUsMjE1LjUgICBjLTUuMyw1LjMtNS4zLDEzLjgsMCwxOS4xYzIuNiwyLjYsNi4xLDQsOS41LDRjMy40LDAsNi45LTEuMyw5LjUtNGwyMjUuMS0yMjUuMUMzNjUuOTMxLDI0Mi44NzUsMzY1LjkzMSwyMzQuMjc1LDM2MC43MzEsMjI5LjA3NXogICAiIGZpbGw9IiNGRkZGRkYiLz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PC9zdmc+);background-size:15px;transition:all .5s}.right-arrow-preview-image:hover{transform:scale(1.2)}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: FallbackImageDirective, selector: "[ksFallbackImage]", inputs: ["fallbackImg"], outputs: ["fallbackApplied"] }, { kind: "directive", type: SizeDirective, selector: "[ksSize]", inputs: ["sizeConfig"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3332
3146
|
}
|
|
3333
3147
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: PreviewsComponent, decorators: [{
|
|
3334
3148
|
type: Component,
|
|
3335
|
-
args: [{ selector: 'ks-previews', changeDetection: ChangeDetectionStrategy.OnPush, imports: [NgTemplateOutlet, FallbackImageDirective, SizeDirective], template: "<nav class=\"previews-container\"\n [class.mobile-visible]=\"previewConfig?.mobileVisible\"\n [attr.aria-label]=\"accessibilityConfig?.previewsContainerAriaLabel\"\n [title]=\"accessibilityConfig?.previewsContainerTitle\">\n\n @if (previewConfig?.visible) {\n <a class=\"nav-left\"\n [attr.aria-label]=\"accessibilityConfig?.previewScrollPrevAriaLabel\"\n [tabIndex]=\"isDisplayLeftPreviewsArrow() ? 0 : -1\" role=\"button\"\n (click)=\"onNavigationEvent('left', $event)\" (keyup)=\"onNavigationEvent('left', $event)\">\n <div class=\"inside {{ isDisplayLeftPreviewsArrow() ? 'left-arrow-preview-image' : 'empty-arrow-preview-image'}}\"\n aria-hidden=\"true\"\n [title]=\"accessibilityConfig?.previewScrollPrevTitle\"></div>\n </a>\n\n @for (preview of previews; track preview.id) {\n <div class=\"preview-container {{!previewConfig?.clickable ? ' unclickable' : ''}}\"\n (click)=\"onImageEvent(preview, $event, clickAction)\"\n (keyup)=\"onImageEvent(preview, $event, keyboardAction)\"\n >\n <ng-container
|
|
3336
|
-
}]
|
|
3337
|
-
type: Input
|
|
3338
|
-
}], currentImage: [{
|
|
3339
|
-
type: Input
|
|
3340
|
-
}], images: [{
|
|
3341
|
-
type: Input
|
|
3342
|
-
}], customTemplate: [{
|
|
3343
|
-
type: Input
|
|
3344
|
-
}], clickPreview: [{
|
|
3345
|
-
type: Output
|
|
3346
|
-
}] } });
|
|
3149
|
+
args: [{ selector: 'ks-previews', changeDetection: ChangeDetectionStrategy.OnPush, imports: [NgTemplateOutlet, FallbackImageDirective, SizeDirective], template: "<nav class=\"previews-container\"\n [class.mobile-visible]=\"previewConfig?.mobileVisible\"\n [attr.aria-label]=\"accessibilityConfig?.previewsContainerAriaLabel\"\n [title]=\"accessibilityConfig?.previewsContainerTitle\">\n\n @if (previewConfig?.visible) {\n <a class=\"nav-left\"\n [attr.aria-label]=\"accessibilityConfig?.previewScrollPrevAriaLabel\"\n [tabIndex]=\"isDisplayLeftPreviewsArrow() ? 0 : -1\" role=\"button\"\n (click)=\"onNavigationEvent('left', $event)\" (keyup)=\"onNavigationEvent('left', $event)\">\n <div class=\"inside {{ isDisplayLeftPreviewsArrow() ? 'left-arrow-preview-image' : 'empty-arrow-preview-image'}}\"\n aria-hidden=\"true\"\n [title]=\"accessibilityConfig?.previewScrollPrevTitle\"></div>\n </a>\n\n @for (preview of previews; track preview.id) {\n <div class=\"preview-container {{!previewConfig?.clickable ? ' unclickable' : ''}}\"\n (click)=\"onImageEvent(preview, $event, clickAction)\"\n (keyup)=\"onImageEvent(preview, $event, keyboardAction)\"\n >\n <ng-container *ngTemplateOutlet=\"!customTemplate() ? defaultTemplate : customTemplate() ; context:{preview, defaultTemplate}\" />\n <ng-template #defaultTemplate>\n @if (preview?.modal?.img) {\n <img class=\"inside preview-image {{isActive(preview) ? 'active' : ''}}\"\n loading=\"{{preview.loading}}\"\n [attr.fetchpriority]=\"preview.fetchpriority\"\n [src]=\"preview.plain?.img ? preview.plain?.img! : preview.modal.img\"\n ksFallbackImage [fallbackImg]=\"preview.plain?.fallbackImg ? preview.plain?.fallbackImg : preview.modal.fallbackImg\"\n ksSize [sizeConfig]=\"{width: previewConfig?.size ? previewConfig?.size?.width! : defaultPreviewSize.width,\n height: previewConfig?.size ? previewConfig?.size?.height! : defaultPreviewSize.height}\"\n [attr.aria-label]=\"preview.modal.ariaLabel ? preview.modal.ariaLabel : ''\"\n [title]=\"(preview.modal.title || preview.modal.title === '') ? preview.modal.title : ''\"\n alt=\"{{preview.modal.alt ? preview.modal.alt : ''}}\"\n [tabIndex]=\"0\" role=\"img\"\n />\n }\n </ng-template>\n </div>\n }\n\n\n <a class=\"nav-right\"\n [attr.aria-label]=\"accessibilityConfig?.previewScrollNextAriaLabel\"\n [tabIndex]=\"isDisplayRightPreviewsArrow() ? 0 : -1\" role=\"button\"\n (click)=\"onNavigationEvent('right', $event)\" (keyup)=\"onNavigationEvent('right', $event)\">\n <div class=\"inside {{ isDisplayRightPreviewsArrow() ? 'right-arrow-preview-image' : 'empty-arrow-preview-image'}}\"\n aria-hidden=\"true\"\n [title]=\"accessibilityConfig?.previewScrollNextTitle\"></div>\n </a>\n }\n</nav>\n", styles: ["@media only screen and (max-width: 767px),only screen and (max-device-width: 767px){.previews-container{display:none}.previews-container>.preview-image{display:none}.previews-container>.nav-left{display:none}.previews-container>.nav-right{display:none}.previews-container.mobile-visible{align-items:center;animation:fadein-semi-visible08 .8s;display:flex;flex-direction:row;justify-content:center;margin-bottom:15px}.previews-container.mobile-visible>.nav-left{display:flex}.previews-container.mobile-visible>.nav-right{display:flex}.previews-container.mobile-visible>.preview-image{cursor:pointer;display:flex;margin-left:2px;margin-right:2px;opacity:.7;height:50px}.previews-container.mobile-visible>.preview-image.active{opacity:1}.previews-container.mobile-visible>.preview-image.unclickable{cursor:not-allowed}.previews-container.mobile-visible>.preview-image:hover{opacity:1;transition:all .5s ease;transition-property:opacity}}@media only screen and (min-device-width: 768px){.previews-container{align-items:center;animation:fadein-semi-visible08 .8s;display:flex;flex-direction:row;justify-content:center;margin-bottom:15px}.previews-container .preview-container{margin-left:2px;margin-right:2px;cursor:pointer}.previews-container .preview-container.unclickable{cursor:not-allowed}.previews-container .preview-container .preview-image{opacity:.7;height:50px}.previews-container .preview-container .preview-image.active{opacity:1}.previews-container .preview-container .preview-image:hover{opacity:1;transition:all .5s ease;transition-property:opacity}.previews-container .nav,.previews-container>.nav-right,.previews-container>.nav-left{color:#919191;cursor:pointer;transition:all .5s}.previews-container .nav:hover,.previews-container>.nav-right:hover,.previews-container>.nav-left:hover{transform:scale(1.1)}.previews-container>.nav-left{margin-right:10px}.previews-container>.nav-right{margin-left:10px}}@keyframes fadein-visible{0%{opacity:0}to{opacity:1}}@keyframes fadein-semi-visible05{0%{opacity:0}to{opacity:.5}}@keyframes fadein-semi-visible08{0%{opacity:0}to{opacity:.8}}@keyframes fadein-semi-visible09{0%{opacity:0}to{opacity:.9}}\n", ".arrow-preview-image,.right-arrow-preview-image,.left-arrow-preview-image,.empty-arrow-preview-image{width:15px;height:15px;opacity:.5}.empty-arrow-preview-image{background:#000;opacity:0}.left-arrow-preview-image{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/PjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4PSIwcHgiIHk9IjBweCIgdmlld0JveD0iMCAwIDQ3Ny4xNzUgNDc3LjE3NSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgNDc3LjE3NSA0NzcuMTc1OyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIgd2lkdGg9IjUxMnB4IiBoZWlnaHQ9IjUxMnB4Ij48Zz48cGF0aCBkPSJNMTQ1LjE4OCwyMzguNTc1bDIxNS41LTIxNS41YzUuMy01LjMsNS4zLTEzLjgsMC0xOS4xcy0xMy44LTUuMy0xOS4xLDBsLTIyNS4xLDIyNS4xYy01LjMsNS4zLTUuMywxMy44LDAsMTkuMWwyMjUuMSwyMjUgICBjMi42LDIuNiw2LjEsNCw5LjUsNHM2LjktMS4zLDkuNS00YzUuMy01LjMsNS4zLTEzLjgsMC0xOS4xTDE0NS4xODgsMjM4LjU3NXoiIGZpbGw9IiNGRkZGRkYiLz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PC9zdmc+);background-size:15px;transition:all .5s}.left-arrow-preview-image:hover{transform:scale(1.2)}.right-arrow-preview-image{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/PjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4PSIwcHgiIHk9IjBweCIgdmlld0JveD0iMCAwIDQ3Ny4xNzUgNDc3LjE3NSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgNDc3LjE3NSA0NzcuMTc1OyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIgd2lkdGg9IjUxMnB4IiBoZWlnaHQ9IjUxMnB4Ij48Zz48cGF0aCBkPSJNMzYwLjczMSwyMjkuMDc1bC0yMjUuMS0yMjUuMWMtNS4zLTUuMy0xMy44LTUuMy0xOS4xLDBzLTUuMywxMy44LDAsMTkuMWwyMTUuNSwyMTUuNWwtMjE1LjUsMjE1LjUgICBjLTUuMyw1LjMtNS4zLDEzLjgsMCwxOS4xYzIuNiwyLjYsNi4xLDQsOS41LDRjMy40LDAsNi45LTEuMyw5LjUtNGwyMjUuMS0yMjUuMUMzNjUuOTMxLDI0Mi44NzUsMzY1LjkzMSwyMzQuMjc1LDM2MC43MzEsMjI5LjA3NXogICAiIGZpbGw9IiNGRkZGRkYiLz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PC9zdmc+);background-size:15px;transition:all .5s}.right-arrow-preview-image:hover{transform:scale(1.2)}\n"] }]
|
|
3150
|
+
}] });
|
|
3347
3151
|
|
|
3348
3152
|
/*
|
|
3349
3153
|
The MIT License (MIT)
|
|
@@ -3369,48 +3173,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImpor
|
|
|
3369
3173
|
SOFTWARE.
|
|
3370
3174
|
*/
|
|
3371
3175
|
/**
|
|
3372
|
-
*
|
|
3373
|
-
*/
|
|
3374
|
-
const Keyboard = {
|
|
3375
|
-
ESC: ESC_CODE,
|
|
3376
|
-
LEFT_ARROW: LEFT_ARROW_CODE,
|
|
3377
|
-
RIGHT_ARROW: RIGHT_ARROW_CODE,
|
|
3378
|
-
UP_ARROW: UP_ARROW_CODE,
|
|
3379
|
-
DOWN_ARROW: DOWN_ARROW_CODE
|
|
3380
|
-
};
|
|
3381
|
-
|
|
3382
|
-
/*
|
|
3383
|
-
The MIT License (MIT)
|
|
3384
|
-
|
|
3385
|
-
Copyright (c) 2017-2025 Stefano Cappa (Ks89)
|
|
3386
|
-
|
|
3387
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
3388
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
3389
|
-
in the Software without restriction, including without limitation the rights
|
|
3390
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
3391
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
3392
|
-
furnished to do so, subject to the following conditions:
|
|
3393
|
-
|
|
3394
|
-
The above copyright notice and this permission notice shall be included in all
|
|
3395
|
-
copies or substantial portions of the Software.
|
|
3396
|
-
|
|
3397
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
3398
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
3399
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL THE
|
|
3400
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
3401
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
3402
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
3403
|
-
SOFTWARE.
|
|
3404
|
-
*/
|
|
3405
|
-
/**
|
|
3406
|
-
* Directive to manage keyboard navigation.
|
|
3176
|
+
* Directive to manage keyboard navigation.
|
|
3407
3177
|
*/
|
|
3408
3178
|
class KeyboardNavigationDirective {
|
|
3409
3179
|
constructor() {
|
|
3180
|
+
/**
|
|
3181
|
+
* Boolean input to skip keyboard navigation.
|
|
3182
|
+
*/
|
|
3183
|
+
this.isOpen = input.required(...(ngDevMode ? [{ debugName: "isOpen" }] : []));
|
|
3410
3184
|
/**
|
|
3411
3185
|
* Output to emit keyboard `code` of the pressed key (keydown).
|
|
3412
3186
|
*/
|
|
3413
|
-
this.keyboardNavigation =
|
|
3187
|
+
this.keyboardNavigation = output();
|
|
3414
3188
|
}
|
|
3415
3189
|
/**
|
|
3416
3190
|
* Listener to catch keyboard's events and call the right method based on the key.
|
|
@@ -3419,22 +3193,18 @@ class KeyboardNavigationDirective {
|
|
|
3419
3193
|
* @param e KeyboardEvent caught by the listener.
|
|
3420
3194
|
*/
|
|
3421
3195
|
onKeyDown(e) {
|
|
3422
|
-
if (!this.isOpen) {
|
|
3196
|
+
if (!this.isOpen()) {
|
|
3423
3197
|
return;
|
|
3424
3198
|
}
|
|
3425
3199
|
this.keyboardNavigation.emit(e.code);
|
|
3426
3200
|
}
|
|
3427
3201
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: KeyboardNavigationDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
3428
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
3202
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.1.7", type: KeyboardNavigationDirective, isStandalone: true, selector: "[ksKeyboardNavigation]", inputs: { isOpen: { classPropertyName: "isOpen", publicName: "isOpen", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { keyboardNavigation: "keyboardNavigation" }, host: { listeners: { "window:keydown": "onKeyDown($event)" } }, ngImport: i0 }); }
|
|
3429
3203
|
}
|
|
3430
3204
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: KeyboardNavigationDirective, decorators: [{
|
|
3431
3205
|
type: Directive,
|
|
3432
3206
|
args: [{ selector: '[ksKeyboardNavigation]' }]
|
|
3433
|
-
}], propDecorators: {
|
|
3434
|
-
type: Input
|
|
3435
|
-
}], keyboardNavigation: [{
|
|
3436
|
-
type: Output
|
|
3437
|
-
}], onKeyDown: [{
|
|
3207
|
+
}], propDecorators: { onKeyDown: [{
|
|
3438
3208
|
type: HostListener,
|
|
3439
3209
|
args: ['window:keydown', ['$event']]
|
|
3440
3210
|
}] } });
|
|
@@ -3472,19 +3242,19 @@ class SwipeDirective {
|
|
|
3472
3242
|
/**
|
|
3473
3243
|
* Output to emit swipe left event. Payload is empty.
|
|
3474
3244
|
*/
|
|
3475
|
-
this.swipeLeft =
|
|
3245
|
+
this.swipeLeft = output();
|
|
3476
3246
|
/**
|
|
3477
3247
|
* Output to emit swipe right event. Payload is empty.
|
|
3478
3248
|
*/
|
|
3479
|
-
this.swipeRight =
|
|
3249
|
+
this.swipeRight = output();
|
|
3480
3250
|
/**
|
|
3481
3251
|
* Output to emit swipe up event. Payload is empty.
|
|
3482
3252
|
*/
|
|
3483
|
-
this.swipeUp =
|
|
3253
|
+
this.swipeUp = output();
|
|
3484
3254
|
/**
|
|
3485
3255
|
* Output to emit swipe down event. Payload is empty.
|
|
3486
3256
|
*/
|
|
3487
|
-
this.swipeDown =
|
|
3257
|
+
this.swipeDown = output();
|
|
3488
3258
|
}
|
|
3489
3259
|
/**
|
|
3490
3260
|
* Method called by Angular itself every click thanks to `@HostListener`.
|
|
@@ -3532,15 +3302,7 @@ class SwipeDirective {
|
|
|
3532
3302
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: SwipeDirective, decorators: [{
|
|
3533
3303
|
type: Directive,
|
|
3534
3304
|
args: [{ selector: '[ksSwipe]' }]
|
|
3535
|
-
}], propDecorators: {
|
|
3536
|
-
type: Output
|
|
3537
|
-
}], swipeRight: [{
|
|
3538
|
-
type: Output
|
|
3539
|
-
}], swipeUp: [{
|
|
3540
|
-
type: Output
|
|
3541
|
-
}], swipeDown: [{
|
|
3542
|
-
type: Output
|
|
3543
|
-
}], handleTouch: [{
|
|
3305
|
+
}], propDecorators: { handleTouch: [{
|
|
3544
3306
|
type: HostListener,
|
|
3545
3307
|
args: ['touchstart', ['$event']]
|
|
3546
3308
|
}, {
|
|
@@ -3579,6 +3341,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImpor
|
|
|
3579
3341
|
*/
|
|
3580
3342
|
class LoadingSpinnerComponent {
|
|
3581
3343
|
constructor() {
|
|
3344
|
+
/**
|
|
3345
|
+
* Object of type `LoadingConfig` exposed to the template.
|
|
3346
|
+
* It contains a field to choose a loading spinner.
|
|
3347
|
+
*/
|
|
3348
|
+
this.loadingConfig = input(...(ngDevMode ? [undefined, { debugName: "loadingConfig" }] : []));
|
|
3349
|
+
/**
|
|
3350
|
+
* Object of type `AccessibilityConfig` to init custom accessibility features.
|
|
3351
|
+
* For instance, it contains titles, alt texts, aria-labels and so on.
|
|
3352
|
+
*/
|
|
3353
|
+
this.accessibilityConfig = input(...(ngDevMode ? [undefined, { debugName: "accessibilityConfig" }] : []));
|
|
3582
3354
|
/**
|
|
3583
3355
|
* Enum of type `LoadingType` to choose the standard loading spinner.
|
|
3584
3356
|
* Declared here to be used inside the template.
|
|
@@ -3616,16 +3388,12 @@ class LoadingSpinnerComponent {
|
|
|
3616
3388
|
this.loadingExplosingSquares = LoadingType.EXPLOSING_SQUARES;
|
|
3617
3389
|
}
|
|
3618
3390
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: LoadingSpinnerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3619
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.7", type: LoadingSpinnerComponent, isStandalone: true, selector: "ks-loading-spinner", inputs: { loadingConfig: "loadingConfig", accessibilityConfig: "accessibilityConfig" }, ngImport: i0, template: "<div [attr.aria-label]=\"accessibilityConfig?.loadingSpinnerAriaLabel\"\n [title]=\"accessibilityConfig?.loadingSpinnerTitle\">\n\n @switch (loadingConfig?.type) {\n @case (loadingStandard) {\n <div class=\"cssload-loader\">\n <div class=\"cssload-inner cssload-one\"></div>\n <div class=\"cssload-inner cssload-two\"></div>\n <div class=\"cssload-inner cssload-three\"></div>\n </div>\n }\n @case (loadingBars) {\n <div class=\"loader-bars\">\n </div>\n }\n @case (loadingCircular) {\n <div class=\"loader-circular\">\n </div>\n }\n @case (loadingDots) {\n <div class=\"loader-dots\">\n </div>\n }\n @case (loadingCubeFlipping) {\n <div class=\"cube-wrapper\">\n <div class=\"cube-folding\">\n <span class=\"leaf1\"></span>\n <span class=\"leaf2\"></span>\n <span class=\"leaf3\"></span>\n <span class=\"leaf4\"></span>\n </div>\n </div>\n }\n @case (loadingCircles) {\n <div id=\"preloader\">\n <div id=\"loader\"></div>\n </div>\n }\n @case (loadingExplosingSquares) {\n <div class=\"loader\">\n <span></span>\n <span></span>\n <span></span>\n <span></span>\n </div>\n }\n }\n</div>\n", styles: [".cssload-loader{position:absolute;inset:0;margin:auto;width:64px;height:64px;border-radius:50%;-o-border-radius:50%;-ms-border-radius:50%;-webkit-border-radius:50%;-moz-border-radius:50%;perspective:800px}.cssload-inner{position:absolute;width:100%;height:100%;box-sizing:border-box;-o-box-sizing:border-box;-ms-box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;border-radius:50%;-o-border-radius:50%;-ms-border-radius:50%;-webkit-border-radius:50%;-moz-border-radius:50%}.cssload-inner.cssload-one{left:0%;top:0%;animation:cssload-rotate-one .6s linear infinite;-o-animation:cssload-rotate-one .6s linear infinite;-ms-animation:cssload-rotate-one .6s linear infinite;-webkit-animation:cssload-rotate-one .6s linear infinite;-moz-animation:cssload-rotate-one .6s linear infinite;border-bottom:3px solid rgba(255,255,255,.99)}.cssload-inner.cssload-two{right:0%;top:0%;animation:cssload-rotate-two .6s linear infinite;-o-animation:cssload-rotate-two .6s linear infinite;-ms-animation:cssload-rotate-two .6s linear infinite;-webkit-animation:cssload-rotate-two .6s linear infinite;-moz-animation:cssload-rotate-two .6s linear infinite;border-right:3px solid rgb(255,255,255)}.cssload-inner.cssload-three{right:0%;bottom:0%;animation:cssload-rotate-three .6s linear infinite;-o-animation:cssload-rotate-three .6s linear infinite;-ms-animation:cssload-rotate-three .6s linear infinite;-webkit-animation:cssload-rotate-three .6s linear infinite;-moz-animation:cssload-rotate-three .6s linear infinite;border-top:3px solid rgb(255,255,255)}@keyframes cssload-rotate-one{0%{transform:rotateX(35deg) rotateY(-45deg) rotate(0)}to{transform:rotateX(35deg) rotateY(-45deg) rotate(360deg)}}@-o-keyframes cssload-rotate-one{0%{-o-transform:rotateX(35deg) rotateY(-45deg) rotateZ(0deg)}to{-o-transform:rotateX(35deg) rotateY(-45deg) rotateZ(360deg)}}@-ms-keyframes cssload-rotate-one{0%{-ms-transform:rotateX(35deg) rotateY(-45deg) rotateZ(0deg)}to{-ms-transform:rotateX(35deg) rotateY(-45deg) rotateZ(360deg)}}@-webkit-keyframes cssload-rotate-one{0%{-webkit-transform:rotateX(35deg) rotateY(-45deg) rotateZ(0deg)}to{-webkit-transform:rotateX(35deg) rotateY(-45deg) rotateZ(360deg)}}@-moz-keyframes cssload-rotate-one{0%{-moz-transform:rotateX(35deg) rotateY(-45deg) rotateZ(0deg)}to{-moz-transform:rotateX(35deg) rotateY(-45deg) rotateZ(360deg)}}@keyframes cssload-rotate-two{0%{transform:rotateX(50deg) rotateY(10deg) rotate(0)}to{transform:rotateX(50deg) rotateY(10deg) rotate(360deg)}}@-o-keyframes cssload-rotate-two{0%{-o-transform:rotateX(50deg) rotateY(10deg) rotateZ(0deg)}to{-o-transform:rotateX(50deg) rotateY(10deg) rotateZ(360deg)}}@-ms-keyframes cssload-rotate-two{0%{-ms-transform:rotateX(50deg) rotateY(10deg) rotateZ(0deg)}to{-ms-transform:rotateX(50deg) rotateY(10deg) rotateZ(360deg)}}@-webkit-keyframes cssload-rotate-two{0%{-webkit-transform:rotateX(50deg) rotateY(10deg) rotateZ(0deg)}to{-webkit-transform:rotateX(50deg) rotateY(10deg) rotateZ(360deg)}}@-moz-keyframes cssload-rotate-two{0%{-moz-transform:rotateX(50deg) rotateY(10deg) rotateZ(0deg)}to{-moz-transform:rotateX(50deg) rotateY(10deg) rotateZ(360deg)}}@keyframes cssload-rotate-three{0%{transform:rotateX(35deg) rotateY(55deg) rotate(0)}to{transform:rotateX(35deg) rotateY(55deg) rotate(360deg)}}@-o-keyframes cssload-rotate-three{0%{-o-transform:rotateX(35deg) rotateY(55deg) rotateZ(0deg)}to{-o-transform:rotateX(35deg) rotateY(55deg) rotateZ(360deg)}}@-ms-keyframes cssload-rotate-three{0%{-ms-transform:rotateX(35deg) rotateY(55deg) rotateZ(0deg)}to{-ms-transform:rotateX(35deg) rotateY(55deg) rotateZ(360deg)}}@-webkit-keyframes cssload-rotate-three{0%{-webkit-transform:rotateX(35deg) rotateY(55deg) rotateZ(0deg)}to{-webkit-transform:rotateX(35deg) rotateY(55deg) rotateZ(360deg)}}@-moz-keyframes cssload-rotate-three{0%{-moz-transform:rotateX(35deg) rotateY(55deg) rotateZ(0deg)}to{-moz-transform:rotateX(35deg) rotateY(55deg) rotateZ(360deg)}}\n", ".loader-dots{position:absolute;inset:0;color:#fefcff;font-size:10px;margin:auto;width:1em;height:1em;border-radius:50%;text-indent:-9999em;-webkit-animation:load4 1.3s infinite linear;animation:load4 1.3s infinite linear;-webkit-transform:translateZ(0);-ms-transform:translateZ(0);transform:translateZ(0)}@-webkit-keyframes load4{0%,to{box-shadow:0 -3em 0 .2em,2em -2em,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em}12.5%{box-shadow:0 -3em,2em -2em 0 .2em,3em 0,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 -1em}25%{box-shadow:0 -3em 0 -.5em,2em -2em,3em 0 0 .2em,2em 2em,0 3em 0 -1em,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 -1em}37.5%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0,2em 2em 0 .2em,0 3em,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 -1em}50%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 -1em,2em 2em,0 3em 0 .2em,-2em 2em,-3em 0 0 -1em,-2em -2em 0 -1em}62.5%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 -1em,0 3em,-2em 2em 0 .2em,-3em 0,-2em -2em 0 -1em}75%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em,-3em 0 0 .2em,-2em -2em}87.5%{box-shadow:0 -3em,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em,-3em 0,-2em -2em 0 .2em}}@keyframes load4{0%,to{box-shadow:0 -3em 0 .2em,2em -2em,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em}12.5%{box-shadow:0 -3em,2em -2em 0 .2em,3em 0,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 -1em}25%{box-shadow:0 -3em 0 -.5em,2em -2em,3em 0 0 .2em,2em 2em,0 3em 0 -1em,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 -1em}37.5%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0,2em 2em 0 .2em,0 3em,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 -1em}50%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 -1em,2em 2em,0 3em 0 .2em,-2em 2em,-3em 0 0 -1em,-2em -2em 0 -1em}62.5%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 -1em,0 3em,-2em 2em 0 .2em,-3em 0,-2em -2em 0 -1em}75%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em,-3em 0 0 .2em,-2em -2em}87.5%{box-shadow:0 -3em,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em,-3em 0,-2em -2em 0 .2em}}\n", ".loader-bars,.loader-bars:before,.loader-bars:after{background:#fefcff;-webkit-animation:load1 1s infinite ease-in-out;animation:load1 1s infinite ease-in-out;width:1em;height:4em}.loader-bars{position:absolute;inset:0;color:#fefcff;text-indent:-9999em;margin:auto;font-size:11px;-webkit-transform:translateZ(0);-ms-transform:translateZ(0);transform:translateZ(0);-webkit-animation-delay:-.16s;animation-delay:-.16s}.loader-bars:before,.loader-bars:after{position:absolute;top:0;content:\"\"}.loader-bars:before{left:-1.5em;-webkit-animation-delay:-.32s;animation-delay:-.32s}.loader-bars:after{left:1.5em}@-webkit-keyframes load1{0%,80%,to{box-shadow:0 0;height:4em}40%{box-shadow:0 -2em;height:5em}}@keyframes load1{0%,80%,to{box-shadow:0 0;height:4em}40%{box-shadow:0 -2em;height:5em}}\n", ".loader-circular,.loader-circular:after{border-radius:50%;width:10em;height:10em}.loader-circular{position:absolute;inset:0;margin:auto;font-size:10px;text-indent:-9999em;border-top:1.1em solid rgba(255,255,255,.2);border-right:1.1em solid rgba(255,255,255,.2);border-bottom:1.1em solid rgba(255,255,255,.2);border-left:1.1em solid #ffffff;-webkit-transform:translateZ(0);-ms-transform:translateZ(0);transform:translateZ(0);-webkit-animation:load8 1.1s infinite linear;animation:load8 1.1s infinite linear}@-webkit-keyframes load8{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes load8{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}\n", ".cube-folding{width:50px;height:50px;display:inline-block;-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);-webkit-transform:rotate(45deg);transform:rotate(45deg);font-size:0}.cube-folding span{position:relative;width:25px;height:25px;-moz-transform:scale(1.1);-ms-transform:scale(1.1);-webkit-transform:scale(1.1);transform:scale(1.1);display:inline-block}.cube-folding span:before{content:\"\";background-color:#fff;position:absolute;left:0;top:0;display:block;width:25px;height:25px;-moz-transform-origin:100% 100%;-ms-transform-origin:100% 100%;-webkit-transform-origin:100% 100%;transform-origin:100% 100%;-moz-animation:folding 2.5s infinite linear both;-webkit-animation:folding 2.5s infinite linear both;animation:folding 2.5s infinite linear both}.cube-folding .leaf2{-moz-transform:rotateZ(90deg) scale(1.1);-ms-transform:rotateZ(90deg) scale(1.1);-webkit-transform:rotateZ(90deg) scale(1.1);transform:rotate(90deg) scale(1.1)}.cube-folding .leaf2:before{-moz-animation-delay:.3s;-webkit-animation-delay:.3s;animation-delay:.3s;background-color:#f2f2f2}.cube-folding .leaf3{-moz-transform:rotateZ(270deg) scale(1.1);-ms-transform:rotateZ(270deg) scale(1.1);-webkit-transform:rotateZ(270deg) scale(1.1);transform:rotate(270deg) scale(1.1)}.cube-folding .leaf3:before{-moz-animation-delay:.9s;-webkit-animation-delay:.9s;animation-delay:.9s;background-color:#f2f2f2}.cube-folding .leaf4{-moz-transform:rotateZ(180deg) scale(1.1);-ms-transform:rotateZ(180deg) scale(1.1);-webkit-transform:rotateZ(180deg) scale(1.1);transform:rotate(180deg) scale(1.1)}.cube-folding .leaf4:before{-moz-animation-delay:.6s;-webkit-animation-delay:.6s;animation-delay:.6s;background-color:#e6e6e6}@-moz-keyframes folding{0%,10%{-moz-transform:perspective(140px) rotateX(-180deg);transform:perspective(140px) rotateX(-180deg);opacity:0}25%,75%{-moz-transform:perspective(140px) rotateX(0deg);transform:perspective(140px) rotateX(0);opacity:1}90%,to{-moz-transform:perspective(140px) rotateY(180deg);transform:perspective(140px) rotateY(180deg);opacity:0}}@-webkit-keyframes folding{0%,10%{-webkit-transform:perspective(140px) rotateX(-180deg);transform:perspective(140px) rotateX(-180deg);opacity:0}25%,75%{-webkit-transform:perspective(140px) rotateX(0deg);transform:perspective(140px) rotateX(0);opacity:1}90%,to{-webkit-transform:perspective(140px) rotateY(180deg);transform:perspective(140px) rotateY(180deg);opacity:0}}@keyframes folding{0%,10%{-moz-transform:perspective(140px) rotateX(-180deg);-ms-transform:perspective(140px) rotateX(-180deg);-webkit-transform:perspective(140px) rotateX(-180deg);transform:perspective(140px) rotateX(-180deg);opacity:0}25%,75%{-moz-transform:perspective(140px) rotateX(0deg);-ms-transform:perspective(140px) rotateX(0deg);-webkit-transform:perspective(140px) rotateX(0deg);transform:perspective(140px) rotateX(0);opacity:1}90%,to{-moz-transform:perspective(140px) rotateY(180deg);-ms-transform:perspective(140px) rotateY(180deg);-webkit-transform:perspective(140px) rotateY(180deg);transform:perspective(140px) rotateY(180deg);opacity:0}}.cube-wrapper{position:fixed;left:50%;top:50%;margin-top:-50px;margin-left:-50px;width:100px;height:100px;text-align:center}@-moz-keyframes text{to{top:35px}}@-webkit-keyframes text{to{top:35px}}@keyframes text{to{top:35px}}@-moz-keyframes shadow{to{bottom:-18px;width:100px}}@-webkit-keyframes shadow{to{bottom:-18px;width:100px}}@keyframes shadow{to{bottom:-18px;width:100px}}\n", "#preloader{position:fixed;top:0;left:0;width:100%;height:100%}#loader{display:block;position:relative;left:50%;top:50%;width:100px;height:100px;margin:-75px 0 0 -75px;border-radius:50%;border:3px solid transparent;border-top-color:#b4b4b4;-webkit-animation:spin 2s linear infinite;animation:spin 2s linear infinite}#loader:before{content:\"\";position:absolute;inset:5px;border-radius:50%;border:3px solid transparent;border-top-color:#d9d9d9;-webkit-animation:spin 3s linear infinite;animation:spin 3s linear infinite}#loader:after{content:\"\";position:absolute;inset:15px;border-radius:50%;border:3px solid transparent;border-top-color:#fff;-webkit-animation:spin 1.5s linear infinite;animation:spin 1.5s linear infinite}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg);-ms-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(360deg);-ms-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes spin{0%{-webkit-transform:rotate(0deg);-ms-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(360deg);-ms-transform:rotate(360deg);transform:rotate(360deg)}}\n", "@keyframes loader{0%,10%,to{width:60px;height:60px}65%{width:150px;height:150px}}@keyframes loaderBlock{0%,30%{transform:rotate(0)}55%{background-color:#b4b4b4}to{transform:rotate(90deg)}}@keyframes loaderBlockInverse{0%,20%{transform:rotate(0)}55%{background-color:#d9d9d9}to{transform:rotate(-90deg)}}.loader{position:absolute;top:50%;left:50%;width:60px;height:60px;transform:translate(-50%,-50%) rotate(45deg) translateZ(0);animation:loader 1.2s infinite ease-in-out}.loader span{position:absolute;display:block;width:40px;height:40px;background-color:#fff;animation:loaderBlock 1.2s infinite ease-in-out both}.loader span:nth-child(1){top:0;left:0}.loader span:nth-child(2){top:0;right:0;animation:loaderBlockInverse 1.2s infinite ease-in-out both}.loader span:nth-child(3){bottom:0;left:0;animation:loaderBlockInverse 1.2s infinite ease-in-out both}.loader span:nth-child(4){bottom:0;right:0}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3391
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.7", type: LoadingSpinnerComponent, isStandalone: true, selector: "ks-loading-spinner", inputs: { loadingConfig: { classPropertyName: "loadingConfig", publicName: "loadingConfig", isSignal: true, isRequired: false, transformFunction: null }, accessibilityConfig: { classPropertyName: "accessibilityConfig", publicName: "accessibilityConfig", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div [attr.aria-label]=\"accessibilityConfig()?.loadingSpinnerAriaLabel\"\n [title]=\"accessibilityConfig()?.loadingSpinnerTitle\">\n\n @if (loadingConfig()) {\n @switch (loadingConfig()?.type) {\n @case (loadingStandard) {\n <div class=\"cssload-loader\">\n <div class=\"cssload-inner cssload-one\"></div>\n <div class=\"cssload-inner cssload-two\"></div>\n <div class=\"cssload-inner cssload-three\"></div>\n </div>\n }\n @case (loadingBars) {\n <div class=\"loader-bars\">\n </div>\n }\n @case (loadingCircular) {\n <div class=\"loader-circular\">\n </div>\n }\n @case (loadingDots) {\n <div class=\"loader-dots\">\n </div>\n }\n @case (loadingCubeFlipping) {\n <div class=\"cube-wrapper\">\n <div class=\"cube-folding\">\n <span class=\"leaf1\"></span>\n <span class=\"leaf2\"></span>\n <span class=\"leaf3\"></span>\n <span class=\"leaf4\"></span>\n </div>\n </div>\n }\n @case (loadingCircles) {\n <div id=\"preloader\">\n <div id=\"loader\"></div>\n </div>\n }\n @case (loadingExplosingSquares) {\n <div class=\"loader\">\n <span></span>\n <span></span>\n <span></span>\n <span></span>\n </div>\n }\n }\n }\n</div>\n", styles: [".cssload-loader{position:absolute;inset:0;margin:auto;width:64px;height:64px;border-radius:50%;-o-border-radius:50%;-ms-border-radius:50%;-webkit-border-radius:50%;-moz-border-radius:50%;perspective:800px}.cssload-inner{position:absolute;width:100%;height:100%;box-sizing:border-box;-o-box-sizing:border-box;-ms-box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;border-radius:50%;-o-border-radius:50%;-ms-border-radius:50%;-webkit-border-radius:50%;-moz-border-radius:50%}.cssload-inner.cssload-one{left:0%;top:0%;animation:cssload-rotate-one .6s linear infinite;-o-animation:cssload-rotate-one .6s linear infinite;-ms-animation:cssload-rotate-one .6s linear infinite;-webkit-animation:cssload-rotate-one .6s linear infinite;-moz-animation:cssload-rotate-one .6s linear infinite;border-bottom:3px solid rgba(255,255,255,.99)}.cssload-inner.cssload-two{right:0%;top:0%;animation:cssload-rotate-two .6s linear infinite;-o-animation:cssload-rotate-two .6s linear infinite;-ms-animation:cssload-rotate-two .6s linear infinite;-webkit-animation:cssload-rotate-two .6s linear infinite;-moz-animation:cssload-rotate-two .6s linear infinite;border-right:3px solid rgb(255,255,255)}.cssload-inner.cssload-three{right:0%;bottom:0%;animation:cssload-rotate-three .6s linear infinite;-o-animation:cssload-rotate-three .6s linear infinite;-ms-animation:cssload-rotate-three .6s linear infinite;-webkit-animation:cssload-rotate-three .6s linear infinite;-moz-animation:cssload-rotate-three .6s linear infinite;border-top:3px solid rgb(255,255,255)}@keyframes cssload-rotate-one{0%{transform:rotateX(35deg) rotateY(-45deg) rotate(0)}to{transform:rotateX(35deg) rotateY(-45deg) rotate(360deg)}}@-o-keyframes cssload-rotate-one{0%{-o-transform:rotateX(35deg) rotateY(-45deg) rotateZ(0deg)}to{-o-transform:rotateX(35deg) rotateY(-45deg) rotateZ(360deg)}}@-ms-keyframes cssload-rotate-one{0%{-ms-transform:rotateX(35deg) rotateY(-45deg) rotateZ(0deg)}to{-ms-transform:rotateX(35deg) rotateY(-45deg) rotateZ(360deg)}}@-webkit-keyframes cssload-rotate-one{0%{-webkit-transform:rotateX(35deg) rotateY(-45deg) rotateZ(0deg)}to{-webkit-transform:rotateX(35deg) rotateY(-45deg) rotateZ(360deg)}}@-moz-keyframes cssload-rotate-one{0%{-moz-transform:rotateX(35deg) rotateY(-45deg) rotateZ(0deg)}to{-moz-transform:rotateX(35deg) rotateY(-45deg) rotateZ(360deg)}}@keyframes cssload-rotate-two{0%{transform:rotateX(50deg) rotateY(10deg) rotate(0)}to{transform:rotateX(50deg) rotateY(10deg) rotate(360deg)}}@-o-keyframes cssload-rotate-two{0%{-o-transform:rotateX(50deg) rotateY(10deg) rotateZ(0deg)}to{-o-transform:rotateX(50deg) rotateY(10deg) rotateZ(360deg)}}@-ms-keyframes cssload-rotate-two{0%{-ms-transform:rotateX(50deg) rotateY(10deg) rotateZ(0deg)}to{-ms-transform:rotateX(50deg) rotateY(10deg) rotateZ(360deg)}}@-webkit-keyframes cssload-rotate-two{0%{-webkit-transform:rotateX(50deg) rotateY(10deg) rotateZ(0deg)}to{-webkit-transform:rotateX(50deg) rotateY(10deg) rotateZ(360deg)}}@-moz-keyframes cssload-rotate-two{0%{-moz-transform:rotateX(50deg) rotateY(10deg) rotateZ(0deg)}to{-moz-transform:rotateX(50deg) rotateY(10deg) rotateZ(360deg)}}@keyframes cssload-rotate-three{0%{transform:rotateX(35deg) rotateY(55deg) rotate(0)}to{transform:rotateX(35deg) rotateY(55deg) rotate(360deg)}}@-o-keyframes cssload-rotate-three{0%{-o-transform:rotateX(35deg) rotateY(55deg) rotateZ(0deg)}to{-o-transform:rotateX(35deg) rotateY(55deg) rotateZ(360deg)}}@-ms-keyframes cssload-rotate-three{0%{-ms-transform:rotateX(35deg) rotateY(55deg) rotateZ(0deg)}to{-ms-transform:rotateX(35deg) rotateY(55deg) rotateZ(360deg)}}@-webkit-keyframes cssload-rotate-three{0%{-webkit-transform:rotateX(35deg) rotateY(55deg) rotateZ(0deg)}to{-webkit-transform:rotateX(35deg) rotateY(55deg) rotateZ(360deg)}}@-moz-keyframes cssload-rotate-three{0%{-moz-transform:rotateX(35deg) rotateY(55deg) rotateZ(0deg)}to{-moz-transform:rotateX(35deg) rotateY(55deg) rotateZ(360deg)}}\n", ".loader-dots{position:absolute;inset:0;color:#fefcff;font-size:10px;margin:auto;width:1em;height:1em;border-radius:50%;text-indent:-9999em;-webkit-animation:load4 1.3s infinite linear;animation:load4 1.3s infinite linear;-webkit-transform:translateZ(0);-ms-transform:translateZ(0);transform:translateZ(0)}@-webkit-keyframes load4{0%,to{box-shadow:0 -3em 0 .2em,2em -2em,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em}12.5%{box-shadow:0 -3em,2em -2em 0 .2em,3em 0,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 -1em}25%{box-shadow:0 -3em 0 -.5em,2em -2em,3em 0 0 .2em,2em 2em,0 3em 0 -1em,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 -1em}37.5%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0,2em 2em 0 .2em,0 3em,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 -1em}50%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 -1em,2em 2em,0 3em 0 .2em,-2em 2em,-3em 0 0 -1em,-2em -2em 0 -1em}62.5%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 -1em,0 3em,-2em 2em 0 .2em,-3em 0,-2em -2em 0 -1em}75%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em,-3em 0 0 .2em,-2em -2em}87.5%{box-shadow:0 -3em,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em,-3em 0,-2em -2em 0 .2em}}@keyframes load4{0%,to{box-shadow:0 -3em 0 .2em,2em -2em,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em}12.5%{box-shadow:0 -3em,2em -2em 0 .2em,3em 0,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 -1em}25%{box-shadow:0 -3em 0 -.5em,2em -2em,3em 0 0 .2em,2em 2em,0 3em 0 -1em,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 -1em}37.5%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0,2em 2em 0 .2em,0 3em,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 -1em}50%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 -1em,2em 2em,0 3em 0 .2em,-2em 2em,-3em 0 0 -1em,-2em -2em 0 -1em}62.5%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 -1em,0 3em,-2em 2em 0 .2em,-3em 0,-2em -2em 0 -1em}75%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em,-3em 0 0 .2em,-2em -2em}87.5%{box-shadow:0 -3em,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em,-3em 0,-2em -2em 0 .2em}}\n", ".loader-bars,.loader-bars:before,.loader-bars:after{background:#fefcff;-webkit-animation:load1 1s infinite ease-in-out;animation:load1 1s infinite ease-in-out;width:1em;height:4em}.loader-bars{position:absolute;inset:0;color:#fefcff;text-indent:-9999em;margin:auto;font-size:11px;-webkit-transform:translateZ(0);-ms-transform:translateZ(0);transform:translateZ(0);-webkit-animation-delay:-.16s;animation-delay:-.16s}.loader-bars:before,.loader-bars:after{position:absolute;top:0;content:\"\"}.loader-bars:before{left:-1.5em;-webkit-animation-delay:-.32s;animation-delay:-.32s}.loader-bars:after{left:1.5em}@-webkit-keyframes load1{0%,80%,to{box-shadow:0 0;height:4em}40%{box-shadow:0 -2em;height:5em}}@keyframes load1{0%,80%,to{box-shadow:0 0;height:4em}40%{box-shadow:0 -2em;height:5em}}\n", ".loader-circular,.loader-circular:after{border-radius:50%;width:10em;height:10em}.loader-circular{position:absolute;inset:0;margin:auto;font-size:10px;text-indent:-9999em;border-top:1.1em solid rgba(255,255,255,.2);border-right:1.1em solid rgba(255,255,255,.2);border-bottom:1.1em solid rgba(255,255,255,.2);border-left:1.1em solid #ffffff;-webkit-transform:translateZ(0);-ms-transform:translateZ(0);transform:translateZ(0);-webkit-animation:load8 1.1s infinite linear;animation:load8 1.1s infinite linear}@-webkit-keyframes load8{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes load8{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}\n", ".cube-folding{width:50px;height:50px;display:inline-block;-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);-webkit-transform:rotate(45deg);transform:rotate(45deg);font-size:0}.cube-folding span{position:relative;width:25px;height:25px;-moz-transform:scale(1.1);-ms-transform:scale(1.1);-webkit-transform:scale(1.1);transform:scale(1.1);display:inline-block}.cube-folding span:before{content:\"\";background-color:#fff;position:absolute;left:0;top:0;display:block;width:25px;height:25px;-moz-transform-origin:100% 100%;-ms-transform-origin:100% 100%;-webkit-transform-origin:100% 100%;transform-origin:100% 100%;-moz-animation:folding 2.5s infinite linear both;-webkit-animation:folding 2.5s infinite linear both;animation:folding 2.5s infinite linear both}.cube-folding .leaf2{-moz-transform:rotateZ(90deg) scale(1.1);-ms-transform:rotateZ(90deg) scale(1.1);-webkit-transform:rotateZ(90deg) scale(1.1);transform:rotate(90deg) scale(1.1)}.cube-folding .leaf2:before{-moz-animation-delay:.3s;-webkit-animation-delay:.3s;animation-delay:.3s;background-color:#f2f2f2}.cube-folding .leaf3{-moz-transform:rotateZ(270deg) scale(1.1);-ms-transform:rotateZ(270deg) scale(1.1);-webkit-transform:rotateZ(270deg) scale(1.1);transform:rotate(270deg) scale(1.1)}.cube-folding .leaf3:before{-moz-animation-delay:.9s;-webkit-animation-delay:.9s;animation-delay:.9s;background-color:#f2f2f2}.cube-folding .leaf4{-moz-transform:rotateZ(180deg) scale(1.1);-ms-transform:rotateZ(180deg) scale(1.1);-webkit-transform:rotateZ(180deg) scale(1.1);transform:rotate(180deg) scale(1.1)}.cube-folding .leaf4:before{-moz-animation-delay:.6s;-webkit-animation-delay:.6s;animation-delay:.6s;background-color:#e6e6e6}@-moz-keyframes folding{0%,10%{-moz-transform:perspective(140px) rotateX(-180deg);transform:perspective(140px) rotateX(-180deg);opacity:0}25%,75%{-moz-transform:perspective(140px) rotateX(0deg);transform:perspective(140px) rotateX(0);opacity:1}90%,to{-moz-transform:perspective(140px) rotateY(180deg);transform:perspective(140px) rotateY(180deg);opacity:0}}@-webkit-keyframes folding{0%,10%{-webkit-transform:perspective(140px) rotateX(-180deg);transform:perspective(140px) rotateX(-180deg);opacity:0}25%,75%{-webkit-transform:perspective(140px) rotateX(0deg);transform:perspective(140px) rotateX(0);opacity:1}90%,to{-webkit-transform:perspective(140px) rotateY(180deg);transform:perspective(140px) rotateY(180deg);opacity:0}}@keyframes folding{0%,10%{-moz-transform:perspective(140px) rotateX(-180deg);-ms-transform:perspective(140px) rotateX(-180deg);-webkit-transform:perspective(140px) rotateX(-180deg);transform:perspective(140px) rotateX(-180deg);opacity:0}25%,75%{-moz-transform:perspective(140px) rotateX(0deg);-ms-transform:perspective(140px) rotateX(0deg);-webkit-transform:perspective(140px) rotateX(0deg);transform:perspective(140px) rotateX(0);opacity:1}90%,to{-moz-transform:perspective(140px) rotateY(180deg);-ms-transform:perspective(140px) rotateY(180deg);-webkit-transform:perspective(140px) rotateY(180deg);transform:perspective(140px) rotateY(180deg);opacity:0}}.cube-wrapper{position:fixed;left:50%;top:50%;margin-top:-50px;margin-left:-50px;width:100px;height:100px;text-align:center}@-moz-keyframes text{to{top:35px}}@-webkit-keyframes text{to{top:35px}}@keyframes text{to{top:35px}}@-moz-keyframes shadow{to{bottom:-18px;width:100px}}@-webkit-keyframes shadow{to{bottom:-18px;width:100px}}@keyframes shadow{to{bottom:-18px;width:100px}}\n", "#preloader{position:fixed;top:0;left:0;width:100%;height:100%}#loader{display:block;position:relative;left:50%;top:50%;width:100px;height:100px;margin:-75px 0 0 -75px;border-radius:50%;border:3px solid transparent;border-top-color:#b4b4b4;-webkit-animation:spin 2s linear infinite;animation:spin 2s linear infinite}#loader:before{content:\"\";position:absolute;inset:5px;border-radius:50%;border:3px solid transparent;border-top-color:#d9d9d9;-webkit-animation:spin 3s linear infinite;animation:spin 3s linear infinite}#loader:after{content:\"\";position:absolute;inset:15px;border-radius:50%;border:3px solid transparent;border-top-color:#fff;-webkit-animation:spin 1.5s linear infinite;animation:spin 1.5s linear infinite}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg);-ms-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(360deg);-ms-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes spin{0%{-webkit-transform:rotate(0deg);-ms-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(360deg);-ms-transform:rotate(360deg);transform:rotate(360deg)}}\n", "@keyframes loader{0%,10%,to{width:60px;height:60px}65%{width:150px;height:150px}}@keyframes loaderBlock{0%,30%{transform:rotate(0)}55%{background-color:#b4b4b4}to{transform:rotate(90deg)}}@keyframes loaderBlockInverse{0%,20%{transform:rotate(0)}55%{background-color:#d9d9d9}to{transform:rotate(-90deg)}}.loader{position:absolute;top:50%;left:50%;width:60px;height:60px;transform:translate(-50%,-50%) rotate(45deg) translateZ(0);animation:loader 1.2s infinite ease-in-out}.loader span{position:absolute;display:block;width:40px;height:40px;background-color:#fff;animation:loaderBlock 1.2s infinite ease-in-out both}.loader span:nth-child(1){top:0;left:0}.loader span:nth-child(2){top:0;right:0;animation:loaderBlockInverse 1.2s infinite ease-in-out both}.loader span:nth-child(3){bottom:0;left:0;animation:loaderBlockInverse 1.2s infinite ease-in-out both}.loader span:nth-child(4){bottom:0;right:0}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3620
3392
|
}
|
|
3621
3393
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: LoadingSpinnerComponent, decorators: [{
|
|
3622
3394
|
type: Component,
|
|
3623
|
-
args: [{ selector: 'ks-loading-spinner', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [attr.aria-label]=\"accessibilityConfig?.loadingSpinnerAriaLabel\"\n [title]=\"accessibilityConfig?.loadingSpinnerTitle\">\n\n @switch (loadingConfig?.type) {\n @case (loadingStandard) {\n <div class=\"cssload-loader\">\n <div class=\"cssload-inner cssload-one\"></div>\n <div class=\"cssload-inner cssload-two\"></div>\n <div class=\"cssload-inner cssload-three\"></div>\n </div>\n }\n @case (loadingBars) {\n <div class=\"loader-bars\">\n </div>\n }\n @case (loadingCircular) {\n <div class=\"loader-circular\">\n </div>\n }\n @case (loadingDots) {\n <div class=\"loader-dots\">\n </div>\n }\n @case (loadingCubeFlipping) {\n <div class=\"cube-wrapper\">\n <div class=\"cube-folding\">\n <span class=\"leaf1\"></span>\n <span class=\"leaf2\"></span>\n <span class=\"leaf3\"></span>\n <span class=\"leaf4\"></span>\n </div>\n </div>\n }\n @case (loadingCircles) {\n <div id=\"preloader\">\n <div id=\"loader\"></div>\n </div>\n }\n @case (loadingExplosingSquares) {\n <div class=\"loader\">\n <span></span>\n <span></span>\n <span></span>\n <span></span>\n </div>\n }\n }\n</div>\n", styles: [".cssload-loader{position:absolute;inset:0;margin:auto;width:64px;height:64px;border-radius:50%;-o-border-radius:50%;-ms-border-radius:50%;-webkit-border-radius:50%;-moz-border-radius:50%;perspective:800px}.cssload-inner{position:absolute;width:100%;height:100%;box-sizing:border-box;-o-box-sizing:border-box;-ms-box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;border-radius:50%;-o-border-radius:50%;-ms-border-radius:50%;-webkit-border-radius:50%;-moz-border-radius:50%}.cssload-inner.cssload-one{left:0%;top:0%;animation:cssload-rotate-one .6s linear infinite;-o-animation:cssload-rotate-one .6s linear infinite;-ms-animation:cssload-rotate-one .6s linear infinite;-webkit-animation:cssload-rotate-one .6s linear infinite;-moz-animation:cssload-rotate-one .6s linear infinite;border-bottom:3px solid rgba(255,255,255,.99)}.cssload-inner.cssload-two{right:0%;top:0%;animation:cssload-rotate-two .6s linear infinite;-o-animation:cssload-rotate-two .6s linear infinite;-ms-animation:cssload-rotate-two .6s linear infinite;-webkit-animation:cssload-rotate-two .6s linear infinite;-moz-animation:cssload-rotate-two .6s linear infinite;border-right:3px solid rgb(255,255,255)}.cssload-inner.cssload-three{right:0%;bottom:0%;animation:cssload-rotate-three .6s linear infinite;-o-animation:cssload-rotate-three .6s linear infinite;-ms-animation:cssload-rotate-three .6s linear infinite;-webkit-animation:cssload-rotate-three .6s linear infinite;-moz-animation:cssload-rotate-three .6s linear infinite;border-top:3px solid rgb(255,255,255)}@keyframes cssload-rotate-one{0%{transform:rotateX(35deg) rotateY(-45deg) rotate(0)}to{transform:rotateX(35deg) rotateY(-45deg) rotate(360deg)}}@-o-keyframes cssload-rotate-one{0%{-o-transform:rotateX(35deg) rotateY(-45deg) rotateZ(0deg)}to{-o-transform:rotateX(35deg) rotateY(-45deg) rotateZ(360deg)}}@-ms-keyframes cssload-rotate-one{0%{-ms-transform:rotateX(35deg) rotateY(-45deg) rotateZ(0deg)}to{-ms-transform:rotateX(35deg) rotateY(-45deg) rotateZ(360deg)}}@-webkit-keyframes cssload-rotate-one{0%{-webkit-transform:rotateX(35deg) rotateY(-45deg) rotateZ(0deg)}to{-webkit-transform:rotateX(35deg) rotateY(-45deg) rotateZ(360deg)}}@-moz-keyframes cssload-rotate-one{0%{-moz-transform:rotateX(35deg) rotateY(-45deg) rotateZ(0deg)}to{-moz-transform:rotateX(35deg) rotateY(-45deg) rotateZ(360deg)}}@keyframes cssload-rotate-two{0%{transform:rotateX(50deg) rotateY(10deg) rotate(0)}to{transform:rotateX(50deg) rotateY(10deg) rotate(360deg)}}@-o-keyframes cssload-rotate-two{0%{-o-transform:rotateX(50deg) rotateY(10deg) rotateZ(0deg)}to{-o-transform:rotateX(50deg) rotateY(10deg) rotateZ(360deg)}}@-ms-keyframes cssload-rotate-two{0%{-ms-transform:rotateX(50deg) rotateY(10deg) rotateZ(0deg)}to{-ms-transform:rotateX(50deg) rotateY(10deg) rotateZ(360deg)}}@-webkit-keyframes cssload-rotate-two{0%{-webkit-transform:rotateX(50deg) rotateY(10deg) rotateZ(0deg)}to{-webkit-transform:rotateX(50deg) rotateY(10deg) rotateZ(360deg)}}@-moz-keyframes cssload-rotate-two{0%{-moz-transform:rotateX(50deg) rotateY(10deg) rotateZ(0deg)}to{-moz-transform:rotateX(50deg) rotateY(10deg) rotateZ(360deg)}}@keyframes cssload-rotate-three{0%{transform:rotateX(35deg) rotateY(55deg) rotate(0)}to{transform:rotateX(35deg) rotateY(55deg) rotate(360deg)}}@-o-keyframes cssload-rotate-three{0%{-o-transform:rotateX(35deg) rotateY(55deg) rotateZ(0deg)}to{-o-transform:rotateX(35deg) rotateY(55deg) rotateZ(360deg)}}@-ms-keyframes cssload-rotate-three{0%{-ms-transform:rotateX(35deg) rotateY(55deg) rotateZ(0deg)}to{-ms-transform:rotateX(35deg) rotateY(55deg) rotateZ(360deg)}}@-webkit-keyframes cssload-rotate-three{0%{-webkit-transform:rotateX(35deg) rotateY(55deg) rotateZ(0deg)}to{-webkit-transform:rotateX(35deg) rotateY(55deg) rotateZ(360deg)}}@-moz-keyframes cssload-rotate-three{0%{-moz-transform:rotateX(35deg) rotateY(55deg) rotateZ(0deg)}to{-moz-transform:rotateX(35deg) rotateY(55deg) rotateZ(360deg)}}\n", ".loader-dots{position:absolute;inset:0;color:#fefcff;font-size:10px;margin:auto;width:1em;height:1em;border-radius:50%;text-indent:-9999em;-webkit-animation:load4 1.3s infinite linear;animation:load4 1.3s infinite linear;-webkit-transform:translateZ(0);-ms-transform:translateZ(0);transform:translateZ(0)}@-webkit-keyframes load4{0%,to{box-shadow:0 -3em 0 .2em,2em -2em,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em}12.5%{box-shadow:0 -3em,2em -2em 0 .2em,3em 0,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 -1em}25%{box-shadow:0 -3em 0 -.5em,2em -2em,3em 0 0 .2em,2em 2em,0 3em 0 -1em,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 -1em}37.5%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0,2em 2em 0 .2em,0 3em,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 -1em}50%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 -1em,2em 2em,0 3em 0 .2em,-2em 2em,-3em 0 0 -1em,-2em -2em 0 -1em}62.5%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 -1em,0 3em,-2em 2em 0 .2em,-3em 0,-2em -2em 0 -1em}75%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em,-3em 0 0 .2em,-2em -2em}87.5%{box-shadow:0 -3em,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em,-3em 0,-2em -2em 0 .2em}}@keyframes load4{0%,to{box-shadow:0 -3em 0 .2em,2em -2em,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em}12.5%{box-shadow:0 -3em,2em -2em 0 .2em,3em 0,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 -1em}25%{box-shadow:0 -3em 0 -.5em,2em -2em,3em 0 0 .2em,2em 2em,0 3em 0 -1em,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 -1em}37.5%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0,2em 2em 0 .2em,0 3em,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 -1em}50%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 -1em,2em 2em,0 3em 0 .2em,-2em 2em,-3em 0 0 -1em,-2em -2em 0 -1em}62.5%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 -1em,0 3em,-2em 2em 0 .2em,-3em 0,-2em -2em 0 -1em}75%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em,-3em 0 0 .2em,-2em -2em}87.5%{box-shadow:0 -3em,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em,-3em 0,-2em -2em 0 .2em}}\n", ".loader-bars,.loader-bars:before,.loader-bars:after{background:#fefcff;-webkit-animation:load1 1s infinite ease-in-out;animation:load1 1s infinite ease-in-out;width:1em;height:4em}.loader-bars{position:absolute;inset:0;color:#fefcff;text-indent:-9999em;margin:auto;font-size:11px;-webkit-transform:translateZ(0);-ms-transform:translateZ(0);transform:translateZ(0);-webkit-animation-delay:-.16s;animation-delay:-.16s}.loader-bars:before,.loader-bars:after{position:absolute;top:0;content:\"\"}.loader-bars:before{left:-1.5em;-webkit-animation-delay:-.32s;animation-delay:-.32s}.loader-bars:after{left:1.5em}@-webkit-keyframes load1{0%,80%,to{box-shadow:0 0;height:4em}40%{box-shadow:0 -2em;height:5em}}@keyframes load1{0%,80%,to{box-shadow:0 0;height:4em}40%{box-shadow:0 -2em;height:5em}}\n", ".loader-circular,.loader-circular:after{border-radius:50%;width:10em;height:10em}.loader-circular{position:absolute;inset:0;margin:auto;font-size:10px;text-indent:-9999em;border-top:1.1em solid rgba(255,255,255,.2);border-right:1.1em solid rgba(255,255,255,.2);border-bottom:1.1em solid rgba(255,255,255,.2);border-left:1.1em solid #ffffff;-webkit-transform:translateZ(0);-ms-transform:translateZ(0);transform:translateZ(0);-webkit-animation:load8 1.1s infinite linear;animation:load8 1.1s infinite linear}@-webkit-keyframes load8{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes load8{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}\n", ".cube-folding{width:50px;height:50px;display:inline-block;-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);-webkit-transform:rotate(45deg);transform:rotate(45deg);font-size:0}.cube-folding span{position:relative;width:25px;height:25px;-moz-transform:scale(1.1);-ms-transform:scale(1.1);-webkit-transform:scale(1.1);transform:scale(1.1);display:inline-block}.cube-folding span:before{content:\"\";background-color:#fff;position:absolute;left:0;top:0;display:block;width:25px;height:25px;-moz-transform-origin:100% 100%;-ms-transform-origin:100% 100%;-webkit-transform-origin:100% 100%;transform-origin:100% 100%;-moz-animation:folding 2.5s infinite linear both;-webkit-animation:folding 2.5s infinite linear both;animation:folding 2.5s infinite linear both}.cube-folding .leaf2{-moz-transform:rotateZ(90deg) scale(1.1);-ms-transform:rotateZ(90deg) scale(1.1);-webkit-transform:rotateZ(90deg) scale(1.1);transform:rotate(90deg) scale(1.1)}.cube-folding .leaf2:before{-moz-animation-delay:.3s;-webkit-animation-delay:.3s;animation-delay:.3s;background-color:#f2f2f2}.cube-folding .leaf3{-moz-transform:rotateZ(270deg) scale(1.1);-ms-transform:rotateZ(270deg) scale(1.1);-webkit-transform:rotateZ(270deg) scale(1.1);transform:rotate(270deg) scale(1.1)}.cube-folding .leaf3:before{-moz-animation-delay:.9s;-webkit-animation-delay:.9s;animation-delay:.9s;background-color:#f2f2f2}.cube-folding .leaf4{-moz-transform:rotateZ(180deg) scale(1.1);-ms-transform:rotateZ(180deg) scale(1.1);-webkit-transform:rotateZ(180deg) scale(1.1);transform:rotate(180deg) scale(1.1)}.cube-folding .leaf4:before{-moz-animation-delay:.6s;-webkit-animation-delay:.6s;animation-delay:.6s;background-color:#e6e6e6}@-moz-keyframes folding{0%,10%{-moz-transform:perspective(140px) rotateX(-180deg);transform:perspective(140px) rotateX(-180deg);opacity:0}25%,75%{-moz-transform:perspective(140px) rotateX(0deg);transform:perspective(140px) rotateX(0);opacity:1}90%,to{-moz-transform:perspective(140px) rotateY(180deg);transform:perspective(140px) rotateY(180deg);opacity:0}}@-webkit-keyframes folding{0%,10%{-webkit-transform:perspective(140px) rotateX(-180deg);transform:perspective(140px) rotateX(-180deg);opacity:0}25%,75%{-webkit-transform:perspective(140px) rotateX(0deg);transform:perspective(140px) rotateX(0);opacity:1}90%,to{-webkit-transform:perspective(140px) rotateY(180deg);transform:perspective(140px) rotateY(180deg);opacity:0}}@keyframes folding{0%,10%{-moz-transform:perspective(140px) rotateX(-180deg);-ms-transform:perspective(140px) rotateX(-180deg);-webkit-transform:perspective(140px) rotateX(-180deg);transform:perspective(140px) rotateX(-180deg);opacity:0}25%,75%{-moz-transform:perspective(140px) rotateX(0deg);-ms-transform:perspective(140px) rotateX(0deg);-webkit-transform:perspective(140px) rotateX(0deg);transform:perspective(140px) rotateX(0);opacity:1}90%,to{-moz-transform:perspective(140px) rotateY(180deg);-ms-transform:perspective(140px) rotateY(180deg);-webkit-transform:perspective(140px) rotateY(180deg);transform:perspective(140px) rotateY(180deg);opacity:0}}.cube-wrapper{position:fixed;left:50%;top:50%;margin-top:-50px;margin-left:-50px;width:100px;height:100px;text-align:center}@-moz-keyframes text{to{top:35px}}@-webkit-keyframes text{to{top:35px}}@keyframes text{to{top:35px}}@-moz-keyframes shadow{to{bottom:-18px;width:100px}}@-webkit-keyframes shadow{to{bottom:-18px;width:100px}}@keyframes shadow{to{bottom:-18px;width:100px}}\n", "#preloader{position:fixed;top:0;left:0;width:100%;height:100%}#loader{display:block;position:relative;left:50%;top:50%;width:100px;height:100px;margin:-75px 0 0 -75px;border-radius:50%;border:3px solid transparent;border-top-color:#b4b4b4;-webkit-animation:spin 2s linear infinite;animation:spin 2s linear infinite}#loader:before{content:\"\";position:absolute;inset:5px;border-radius:50%;border:3px solid transparent;border-top-color:#d9d9d9;-webkit-animation:spin 3s linear infinite;animation:spin 3s linear infinite}#loader:after{content:\"\";position:absolute;inset:15px;border-radius:50%;border:3px solid transparent;border-top-color:#fff;-webkit-animation:spin 1.5s linear infinite;animation:spin 1.5s linear infinite}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg);-ms-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(360deg);-ms-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes spin{0%{-webkit-transform:rotate(0deg);-ms-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(360deg);-ms-transform:rotate(360deg);transform:rotate(360deg)}}\n", "@keyframes loader{0%,10%,to{width:60px;height:60px}65%{width:150px;height:150px}}@keyframes loaderBlock{0%,30%{transform:rotate(0)}55%{background-color:#b4b4b4}to{transform:rotate(90deg)}}@keyframes loaderBlockInverse{0%,20%{transform:rotate(0)}55%{background-color:#d9d9d9}to{transform:rotate(-90deg)}}.loader{position:absolute;top:50%;left:50%;width:60px;height:60px;transform:translate(-50%,-50%) rotate(45deg) translateZ(0);animation:loader 1.2s infinite ease-in-out}.loader span{position:absolute;display:block;width:40px;height:40px;background-color:#fff;animation:loaderBlock 1.2s infinite ease-in-out both}.loader span:nth-child(1){top:0;left:0}.loader span:nth-child(2){top:0;right:0;animation:loaderBlockInverse 1.2s infinite ease-in-out both}.loader span:nth-child(3){bottom:0;left:0;animation:loaderBlockInverse 1.2s infinite ease-in-out both}.loader span:nth-child(4){bottom:0;right:0}\n"] }]
|
|
3624
|
-
}]
|
|
3625
|
-
type: Input
|
|
3626
|
-
}], accessibilityConfig: [{
|
|
3627
|
-
type: Input
|
|
3628
|
-
}] } });
|
|
3395
|
+
args: [{ selector: 'ks-loading-spinner', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [attr.aria-label]=\"accessibilityConfig()?.loadingSpinnerAriaLabel\"\n [title]=\"accessibilityConfig()?.loadingSpinnerTitle\">\n\n @if (loadingConfig()) {\n @switch (loadingConfig()?.type) {\n @case (loadingStandard) {\n <div class=\"cssload-loader\">\n <div class=\"cssload-inner cssload-one\"></div>\n <div class=\"cssload-inner cssload-two\"></div>\n <div class=\"cssload-inner cssload-three\"></div>\n </div>\n }\n @case (loadingBars) {\n <div class=\"loader-bars\">\n </div>\n }\n @case (loadingCircular) {\n <div class=\"loader-circular\">\n </div>\n }\n @case (loadingDots) {\n <div class=\"loader-dots\">\n </div>\n }\n @case (loadingCubeFlipping) {\n <div class=\"cube-wrapper\">\n <div class=\"cube-folding\">\n <span class=\"leaf1\"></span>\n <span class=\"leaf2\"></span>\n <span class=\"leaf3\"></span>\n <span class=\"leaf4\"></span>\n </div>\n </div>\n }\n @case (loadingCircles) {\n <div id=\"preloader\">\n <div id=\"loader\"></div>\n </div>\n }\n @case (loadingExplosingSquares) {\n <div class=\"loader\">\n <span></span>\n <span></span>\n <span></span>\n <span></span>\n </div>\n }\n }\n }\n</div>\n", styles: [".cssload-loader{position:absolute;inset:0;margin:auto;width:64px;height:64px;border-radius:50%;-o-border-radius:50%;-ms-border-radius:50%;-webkit-border-radius:50%;-moz-border-radius:50%;perspective:800px}.cssload-inner{position:absolute;width:100%;height:100%;box-sizing:border-box;-o-box-sizing:border-box;-ms-box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;border-radius:50%;-o-border-radius:50%;-ms-border-radius:50%;-webkit-border-radius:50%;-moz-border-radius:50%}.cssload-inner.cssload-one{left:0%;top:0%;animation:cssload-rotate-one .6s linear infinite;-o-animation:cssload-rotate-one .6s linear infinite;-ms-animation:cssload-rotate-one .6s linear infinite;-webkit-animation:cssload-rotate-one .6s linear infinite;-moz-animation:cssload-rotate-one .6s linear infinite;border-bottom:3px solid rgba(255,255,255,.99)}.cssload-inner.cssload-two{right:0%;top:0%;animation:cssload-rotate-two .6s linear infinite;-o-animation:cssload-rotate-two .6s linear infinite;-ms-animation:cssload-rotate-two .6s linear infinite;-webkit-animation:cssload-rotate-two .6s linear infinite;-moz-animation:cssload-rotate-two .6s linear infinite;border-right:3px solid rgb(255,255,255)}.cssload-inner.cssload-three{right:0%;bottom:0%;animation:cssload-rotate-three .6s linear infinite;-o-animation:cssload-rotate-three .6s linear infinite;-ms-animation:cssload-rotate-three .6s linear infinite;-webkit-animation:cssload-rotate-three .6s linear infinite;-moz-animation:cssload-rotate-three .6s linear infinite;border-top:3px solid rgb(255,255,255)}@keyframes cssload-rotate-one{0%{transform:rotateX(35deg) rotateY(-45deg) rotate(0)}to{transform:rotateX(35deg) rotateY(-45deg) rotate(360deg)}}@-o-keyframes cssload-rotate-one{0%{-o-transform:rotateX(35deg) rotateY(-45deg) rotateZ(0deg)}to{-o-transform:rotateX(35deg) rotateY(-45deg) rotateZ(360deg)}}@-ms-keyframes cssload-rotate-one{0%{-ms-transform:rotateX(35deg) rotateY(-45deg) rotateZ(0deg)}to{-ms-transform:rotateX(35deg) rotateY(-45deg) rotateZ(360deg)}}@-webkit-keyframes cssload-rotate-one{0%{-webkit-transform:rotateX(35deg) rotateY(-45deg) rotateZ(0deg)}to{-webkit-transform:rotateX(35deg) rotateY(-45deg) rotateZ(360deg)}}@-moz-keyframes cssload-rotate-one{0%{-moz-transform:rotateX(35deg) rotateY(-45deg) rotateZ(0deg)}to{-moz-transform:rotateX(35deg) rotateY(-45deg) rotateZ(360deg)}}@keyframes cssload-rotate-two{0%{transform:rotateX(50deg) rotateY(10deg) rotate(0)}to{transform:rotateX(50deg) rotateY(10deg) rotate(360deg)}}@-o-keyframes cssload-rotate-two{0%{-o-transform:rotateX(50deg) rotateY(10deg) rotateZ(0deg)}to{-o-transform:rotateX(50deg) rotateY(10deg) rotateZ(360deg)}}@-ms-keyframes cssload-rotate-two{0%{-ms-transform:rotateX(50deg) rotateY(10deg) rotateZ(0deg)}to{-ms-transform:rotateX(50deg) rotateY(10deg) rotateZ(360deg)}}@-webkit-keyframes cssload-rotate-two{0%{-webkit-transform:rotateX(50deg) rotateY(10deg) rotateZ(0deg)}to{-webkit-transform:rotateX(50deg) rotateY(10deg) rotateZ(360deg)}}@-moz-keyframes cssload-rotate-two{0%{-moz-transform:rotateX(50deg) rotateY(10deg) rotateZ(0deg)}to{-moz-transform:rotateX(50deg) rotateY(10deg) rotateZ(360deg)}}@keyframes cssload-rotate-three{0%{transform:rotateX(35deg) rotateY(55deg) rotate(0)}to{transform:rotateX(35deg) rotateY(55deg) rotate(360deg)}}@-o-keyframes cssload-rotate-three{0%{-o-transform:rotateX(35deg) rotateY(55deg) rotateZ(0deg)}to{-o-transform:rotateX(35deg) rotateY(55deg) rotateZ(360deg)}}@-ms-keyframes cssload-rotate-three{0%{-ms-transform:rotateX(35deg) rotateY(55deg) rotateZ(0deg)}to{-ms-transform:rotateX(35deg) rotateY(55deg) rotateZ(360deg)}}@-webkit-keyframes cssload-rotate-three{0%{-webkit-transform:rotateX(35deg) rotateY(55deg) rotateZ(0deg)}to{-webkit-transform:rotateX(35deg) rotateY(55deg) rotateZ(360deg)}}@-moz-keyframes cssload-rotate-three{0%{-moz-transform:rotateX(35deg) rotateY(55deg) rotateZ(0deg)}to{-moz-transform:rotateX(35deg) rotateY(55deg) rotateZ(360deg)}}\n", ".loader-dots{position:absolute;inset:0;color:#fefcff;font-size:10px;margin:auto;width:1em;height:1em;border-radius:50%;text-indent:-9999em;-webkit-animation:load4 1.3s infinite linear;animation:load4 1.3s infinite linear;-webkit-transform:translateZ(0);-ms-transform:translateZ(0);transform:translateZ(0)}@-webkit-keyframes load4{0%,to{box-shadow:0 -3em 0 .2em,2em -2em,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em}12.5%{box-shadow:0 -3em,2em -2em 0 .2em,3em 0,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 -1em}25%{box-shadow:0 -3em 0 -.5em,2em -2em,3em 0 0 .2em,2em 2em,0 3em 0 -1em,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 -1em}37.5%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0,2em 2em 0 .2em,0 3em,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 -1em}50%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 -1em,2em 2em,0 3em 0 .2em,-2em 2em,-3em 0 0 -1em,-2em -2em 0 -1em}62.5%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 -1em,0 3em,-2em 2em 0 .2em,-3em 0,-2em -2em 0 -1em}75%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em,-3em 0 0 .2em,-2em -2em}87.5%{box-shadow:0 -3em,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em,-3em 0,-2em -2em 0 .2em}}@keyframes load4{0%,to{box-shadow:0 -3em 0 .2em,2em -2em,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em}12.5%{box-shadow:0 -3em,2em -2em 0 .2em,3em 0,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 -1em}25%{box-shadow:0 -3em 0 -.5em,2em -2em,3em 0 0 .2em,2em 2em,0 3em 0 -1em,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 -1em}37.5%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0,2em 2em 0 .2em,0 3em,-2em 2em 0 -1em,-3em 0 0 -1em,-2em -2em 0 -1em}50%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 -1em,2em 2em,0 3em 0 .2em,-2em 2em,-3em 0 0 -1em,-2em -2em 0 -1em}62.5%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 -1em,0 3em,-2em 2em 0 .2em,-3em 0,-2em -2em 0 -1em}75%{box-shadow:0 -3em 0 -1em,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em,-3em 0 0 .2em,-2em -2em}87.5%{box-shadow:0 -3em,2em -2em 0 -1em,3em 0 0 -1em,2em 2em 0 -1em,0 3em 0 -1em,-2em 2em,-3em 0,-2em -2em 0 .2em}}\n", ".loader-bars,.loader-bars:before,.loader-bars:after{background:#fefcff;-webkit-animation:load1 1s infinite ease-in-out;animation:load1 1s infinite ease-in-out;width:1em;height:4em}.loader-bars{position:absolute;inset:0;color:#fefcff;text-indent:-9999em;margin:auto;font-size:11px;-webkit-transform:translateZ(0);-ms-transform:translateZ(0);transform:translateZ(0);-webkit-animation-delay:-.16s;animation-delay:-.16s}.loader-bars:before,.loader-bars:after{position:absolute;top:0;content:\"\"}.loader-bars:before{left:-1.5em;-webkit-animation-delay:-.32s;animation-delay:-.32s}.loader-bars:after{left:1.5em}@-webkit-keyframes load1{0%,80%,to{box-shadow:0 0;height:4em}40%{box-shadow:0 -2em;height:5em}}@keyframes load1{0%,80%,to{box-shadow:0 0;height:4em}40%{box-shadow:0 -2em;height:5em}}\n", ".loader-circular,.loader-circular:after{border-radius:50%;width:10em;height:10em}.loader-circular{position:absolute;inset:0;margin:auto;font-size:10px;text-indent:-9999em;border-top:1.1em solid rgba(255,255,255,.2);border-right:1.1em solid rgba(255,255,255,.2);border-bottom:1.1em solid rgba(255,255,255,.2);border-left:1.1em solid #ffffff;-webkit-transform:translateZ(0);-ms-transform:translateZ(0);transform:translateZ(0);-webkit-animation:load8 1.1s infinite linear;animation:load8 1.1s infinite linear}@-webkit-keyframes load8{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes load8{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}\n", ".cube-folding{width:50px;height:50px;display:inline-block;-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);-webkit-transform:rotate(45deg);transform:rotate(45deg);font-size:0}.cube-folding span{position:relative;width:25px;height:25px;-moz-transform:scale(1.1);-ms-transform:scale(1.1);-webkit-transform:scale(1.1);transform:scale(1.1);display:inline-block}.cube-folding span:before{content:\"\";background-color:#fff;position:absolute;left:0;top:0;display:block;width:25px;height:25px;-moz-transform-origin:100% 100%;-ms-transform-origin:100% 100%;-webkit-transform-origin:100% 100%;transform-origin:100% 100%;-moz-animation:folding 2.5s infinite linear both;-webkit-animation:folding 2.5s infinite linear both;animation:folding 2.5s infinite linear both}.cube-folding .leaf2{-moz-transform:rotateZ(90deg) scale(1.1);-ms-transform:rotateZ(90deg) scale(1.1);-webkit-transform:rotateZ(90deg) scale(1.1);transform:rotate(90deg) scale(1.1)}.cube-folding .leaf2:before{-moz-animation-delay:.3s;-webkit-animation-delay:.3s;animation-delay:.3s;background-color:#f2f2f2}.cube-folding .leaf3{-moz-transform:rotateZ(270deg) scale(1.1);-ms-transform:rotateZ(270deg) scale(1.1);-webkit-transform:rotateZ(270deg) scale(1.1);transform:rotate(270deg) scale(1.1)}.cube-folding .leaf3:before{-moz-animation-delay:.9s;-webkit-animation-delay:.9s;animation-delay:.9s;background-color:#f2f2f2}.cube-folding .leaf4{-moz-transform:rotateZ(180deg) scale(1.1);-ms-transform:rotateZ(180deg) scale(1.1);-webkit-transform:rotateZ(180deg) scale(1.1);transform:rotate(180deg) scale(1.1)}.cube-folding .leaf4:before{-moz-animation-delay:.6s;-webkit-animation-delay:.6s;animation-delay:.6s;background-color:#e6e6e6}@-moz-keyframes folding{0%,10%{-moz-transform:perspective(140px) rotateX(-180deg);transform:perspective(140px) rotateX(-180deg);opacity:0}25%,75%{-moz-transform:perspective(140px) rotateX(0deg);transform:perspective(140px) rotateX(0);opacity:1}90%,to{-moz-transform:perspective(140px) rotateY(180deg);transform:perspective(140px) rotateY(180deg);opacity:0}}@-webkit-keyframes folding{0%,10%{-webkit-transform:perspective(140px) rotateX(-180deg);transform:perspective(140px) rotateX(-180deg);opacity:0}25%,75%{-webkit-transform:perspective(140px) rotateX(0deg);transform:perspective(140px) rotateX(0);opacity:1}90%,to{-webkit-transform:perspective(140px) rotateY(180deg);transform:perspective(140px) rotateY(180deg);opacity:0}}@keyframes folding{0%,10%{-moz-transform:perspective(140px) rotateX(-180deg);-ms-transform:perspective(140px) rotateX(-180deg);-webkit-transform:perspective(140px) rotateX(-180deg);transform:perspective(140px) rotateX(-180deg);opacity:0}25%,75%{-moz-transform:perspective(140px) rotateX(0deg);-ms-transform:perspective(140px) rotateX(0deg);-webkit-transform:perspective(140px) rotateX(0deg);transform:perspective(140px) rotateX(0);opacity:1}90%,to{-moz-transform:perspective(140px) rotateY(180deg);-ms-transform:perspective(140px) rotateY(180deg);-webkit-transform:perspective(140px) rotateY(180deg);transform:perspective(140px) rotateY(180deg);opacity:0}}.cube-wrapper{position:fixed;left:50%;top:50%;margin-top:-50px;margin-left:-50px;width:100px;height:100px;text-align:center}@-moz-keyframes text{to{top:35px}}@-webkit-keyframes text{to{top:35px}}@keyframes text{to{top:35px}}@-moz-keyframes shadow{to{bottom:-18px;width:100px}}@-webkit-keyframes shadow{to{bottom:-18px;width:100px}}@keyframes shadow{to{bottom:-18px;width:100px}}\n", "#preloader{position:fixed;top:0;left:0;width:100%;height:100%}#loader{display:block;position:relative;left:50%;top:50%;width:100px;height:100px;margin:-75px 0 0 -75px;border-radius:50%;border:3px solid transparent;border-top-color:#b4b4b4;-webkit-animation:spin 2s linear infinite;animation:spin 2s linear infinite}#loader:before{content:\"\";position:absolute;inset:5px;border-radius:50%;border:3px solid transparent;border-top-color:#d9d9d9;-webkit-animation:spin 3s linear infinite;animation:spin 3s linear infinite}#loader:after{content:\"\";position:absolute;inset:15px;border-radius:50%;border:3px solid transparent;border-top-color:#fff;-webkit-animation:spin 1.5s linear infinite;animation:spin 1.5s linear infinite}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg);-ms-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(360deg);-ms-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes spin{0%{-webkit-transform:rotate(0deg);-ms-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(360deg);-ms-transform:rotate(360deg);transform:rotate(360deg)}}\n", "@keyframes loader{0%,10%,to{width:60px;height:60px}65%{width:150px;height:150px}}@keyframes loaderBlock{0%,30%{transform:rotate(0)}55%{background-color:#b4b4b4}to{transform:rotate(90deg)}}@keyframes loaderBlockInverse{0%,20%{transform:rotate(0)}55%{background-color:#d9d9d9}to{transform:rotate(-90deg)}}.loader{position:absolute;top:50%;left:50%;width:60px;height:60px;transform:translate(-50%,-50%) rotate(45deg) translateZ(0);animation:loader 1.2s infinite ease-in-out}.loader span{position:absolute;display:block;width:40px;height:40px;background-color:#fff;animation:loaderBlock 1.2s infinite ease-in-out both}.loader span:nth-child(1){top:0;left:0}.loader span:nth-child(2){top:0;right:0;animation:loaderBlockInverse 1.2s infinite ease-in-out both}.loader span:nth-child(3){bottom:0;left:0;animation:loaderBlockInverse 1.2s infinite ease-in-out both}.loader span:nth-child(4){bottom:0;right:0}\n"] }]
|
|
3396
|
+
}] });
|
|
3629
3397
|
|
|
3630
3398
|
/*
|
|
3631
3399
|
The MIT License (MIT)
|
|
@@ -3654,31 +3422,39 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImpor
|
|
|
3654
3422
|
* Component with the current image with some additional elements like arrows and side previews.
|
|
3655
3423
|
*/
|
|
3656
3424
|
class CurrentImageComponent extends AccessibleComponent {
|
|
3657
|
-
|
|
3658
|
-
|
|
3659
|
-
|
|
3660
|
-
|
|
3661
|
-
|
|
3662
|
-
|
|
3663
|
-
this.
|
|
3664
|
-
|
|
3425
|
+
constructor() {
|
|
3426
|
+
super(...arguments);
|
|
3427
|
+
/**
|
|
3428
|
+
* Unique id (>=0) of the current instance of this library. This is useful when you are using
|
|
3429
|
+
* the service to call modal gallery without open it manually.
|
|
3430
|
+
*/
|
|
3431
|
+
this.id = input.required(...(ngDevMode ? [{ debugName: "id" }] : []));
|
|
3432
|
+
/**
|
|
3433
|
+
* Object of type `InternalLibImage` that represent the visible image.
|
|
3434
|
+
*/
|
|
3435
|
+
this.currentImage = input.required(...(ngDevMode ? [{ debugName: "currentImage" }] : []));
|
|
3436
|
+
/**
|
|
3437
|
+
* Array of `InternalLibImage` that represent the model of this library with all images,
|
|
3438
|
+
* thumbs and so on.
|
|
3439
|
+
*/
|
|
3440
|
+
this.images = input.required(...(ngDevMode ? [{ debugName: "images" }] : []));
|
|
3665
3441
|
/**
|
|
3666
3442
|
* Boolean that it is true if the modal gallery is visible.
|
|
3667
3443
|
* If yes, also this component should be visible.
|
|
3668
3444
|
*/
|
|
3669
|
-
this.isOpen = false;
|
|
3445
|
+
this.isOpen = input(false, ...(ngDevMode ? [{ debugName: "isOpen" }] : []));
|
|
3670
3446
|
/**
|
|
3671
3447
|
* Output to emit an event when images are loaded. The payload contains an `ImageLoadEvent`.
|
|
3672
3448
|
*/
|
|
3673
|
-
this.loadImage =
|
|
3449
|
+
this.loadImage = output();
|
|
3674
3450
|
/**
|
|
3675
3451
|
* Output to emit any changes of the current image. The payload contains an `ImageModalEvent`.
|
|
3676
3452
|
*/
|
|
3677
|
-
this.changeImage =
|
|
3453
|
+
this.changeImage = output();
|
|
3678
3454
|
/**
|
|
3679
3455
|
* Output to emit an event when the modal gallery is closed. The payload contains an `ImageModalEvent`.
|
|
3680
3456
|
*/
|
|
3681
|
-
this.closeGallery =
|
|
3457
|
+
this.closeGallery = output();
|
|
3682
3458
|
/**
|
|
3683
3459
|
* Subject to play modal-gallery.
|
|
3684
3460
|
*/
|
|
@@ -3717,6 +3493,11 @@ class CurrentImageComponent extends AccessibleComponent {
|
|
|
3717
3493
|
* True by default
|
|
3718
3494
|
*/
|
|
3719
3495
|
this.loading = true;
|
|
3496
|
+
this.platformId = inject(PLATFORM_ID);
|
|
3497
|
+
this.ngZone = inject(NgZone);
|
|
3498
|
+
this.configService = inject(ConfigService);
|
|
3499
|
+
// this must be public for testing purposes
|
|
3500
|
+
this.ref = inject(ChangeDetectorRef);
|
|
3720
3501
|
}
|
|
3721
3502
|
/**
|
|
3722
3503
|
* Listener to stop the gallery when the mouse pointer is over the current image.
|
|
@@ -3750,7 +3531,7 @@ class CurrentImageComponent extends AccessibleComponent {
|
|
|
3750
3531
|
* In particular, it's called only one time!!!
|
|
3751
3532
|
*/
|
|
3752
3533
|
ngOnInit() {
|
|
3753
|
-
const libConfig = this.configService.getConfig(this.id);
|
|
3534
|
+
const libConfig = this.configService.getConfig(this.id());
|
|
3754
3535
|
if (!libConfig || !libConfig.buttonsConfig) {
|
|
3755
3536
|
throw new Error('Internal library error - libConfig and buttonsConfig must be defined');
|
|
3756
3537
|
}
|
|
@@ -3766,7 +3547,7 @@ class CurrentImageComponent extends AccessibleComponent {
|
|
|
3766
3547
|
* In particular, it's called when any data-bound property of a directive changes!!!
|
|
3767
3548
|
*/
|
|
3768
3549
|
ngOnChanges(changes) {
|
|
3769
|
-
const libConfig = this.configService.getConfig(this.id);
|
|
3550
|
+
const libConfig = this.configService.getConfig(this.id());
|
|
3770
3551
|
if (!libConfig) {
|
|
3771
3552
|
throw new Error('Internal library error - libConfig must be defined');
|
|
3772
3553
|
}
|
|
@@ -3816,7 +3597,7 @@ class CurrentImageComponent extends AccessibleComponent {
|
|
|
3816
3597
|
const left = this.keyboardConfig && this.keyboardConfig.left ? this.keyboardConfig.left : Keyboard.LEFT_ARROW;
|
|
3817
3598
|
switch (code) {
|
|
3818
3599
|
case esc:
|
|
3819
|
-
this.closeGallery.emit(new ImageModalEvent(this.id, Action.KEYBOARD, true));
|
|
3600
|
+
this.closeGallery.emit(new ImageModalEvent(this.id(), Action.KEYBOARD, true));
|
|
3820
3601
|
break;
|
|
3821
3602
|
case right:
|
|
3822
3603
|
this.nextImage(Action.KEYBOARD);
|
|
@@ -3834,7 +3615,7 @@ class CurrentImageComponent extends AccessibleComponent {
|
|
|
3834
3615
|
* @returns String description of the image (or the current image if not provided)
|
|
3835
3616
|
* @throws an Error if description isn't available
|
|
3836
3617
|
*/
|
|
3837
|
-
getDescriptionToDisplay(image = this.currentImage) {
|
|
3618
|
+
getDescriptionToDisplay(image = this.currentImage()) {
|
|
3838
3619
|
if (!this.currentImageConfig || !this.currentImageConfig.description) {
|
|
3839
3620
|
throw new Error('Description input must be a valid object implementing the Description interface');
|
|
3840
3621
|
}
|
|
@@ -3855,11 +3636,11 @@ class CurrentImageComponent extends AccessibleComponent {
|
|
|
3855
3636
|
* @param image Image to get its alt description. If not provided it will be the current image
|
|
3856
3637
|
* @returns String alt description of the image (or the current image if not provided)
|
|
3857
3638
|
*/
|
|
3858
|
-
getAltDescriptionByImage(image = this.currentImage) {
|
|
3639
|
+
getAltDescriptionByImage(image = this.currentImage()) {
|
|
3859
3640
|
if (!image) {
|
|
3860
3641
|
return '';
|
|
3861
3642
|
}
|
|
3862
|
-
return image.modal && image.modal.description ? image.modal.description : `Image ${getIndex(image, this.images) + 1}`;
|
|
3643
|
+
return image.modal && image.modal.description ? image.modal.description : `Image ${getIndex(image, this.images()) + 1}`;
|
|
3863
3644
|
}
|
|
3864
3645
|
/**
|
|
3865
3646
|
* Method to get the title attributes based on descriptions.
|
|
@@ -3869,7 +3650,7 @@ class CurrentImageComponent extends AccessibleComponent {
|
|
|
3869
3650
|
* @returns String title of the image based on descriptions
|
|
3870
3651
|
* @throws an Error if description isn't available
|
|
3871
3652
|
*/
|
|
3872
|
-
getTitleToDisplay(image = this.currentImage) {
|
|
3653
|
+
getTitleToDisplay(image = this.currentImage()) {
|
|
3873
3654
|
if (!this.currentImageConfig || !this.currentImageConfig.description) {
|
|
3874
3655
|
throw new Error('Description input must be a valid object implementing the Description interface');
|
|
3875
3656
|
}
|
|
@@ -3884,15 +3665,15 @@ class CurrentImageComponent extends AccessibleComponent {
|
|
|
3884
3665
|
if (!this.slideConfig) {
|
|
3885
3666
|
throw new Error('Internal library error - slideConfig must be defined');
|
|
3886
3667
|
}
|
|
3887
|
-
const currentIndex = getIndex(this.currentImage, this.images);
|
|
3668
|
+
const currentIndex = getIndex(this.currentImage(), this.images());
|
|
3888
3669
|
if (currentIndex === 0 && this.slideConfig.infinite) {
|
|
3889
3670
|
// the current image is the first one,
|
|
3890
3671
|
// so the previous one is the last image
|
|
3891
3672
|
// because infinite is true
|
|
3892
|
-
return this.images[this.images.length - 1];
|
|
3673
|
+
return this.images()[this.images().length - 1];
|
|
3893
3674
|
}
|
|
3894
3675
|
this.handleBoundaries(currentIndex);
|
|
3895
|
-
return this.images[Math.max(currentIndex - 1, 0)];
|
|
3676
|
+
return this.images()[Math.max(currentIndex - 1, 0)];
|
|
3896
3677
|
}
|
|
3897
3678
|
/**
|
|
3898
3679
|
* Method to get the right side preview image.
|
|
@@ -3902,15 +3683,16 @@ class CurrentImageComponent extends AccessibleComponent {
|
|
|
3902
3683
|
if (!this.slideConfig) {
|
|
3903
3684
|
throw new Error('Internal library error - slideConfig must be defined');
|
|
3904
3685
|
}
|
|
3905
|
-
const currentIndex = getIndex(this.currentImage, this.images);
|
|
3906
|
-
|
|
3686
|
+
const currentIndex = getIndex(this.currentImage(), this.images());
|
|
3687
|
+
const images = this.images();
|
|
3688
|
+
if (currentIndex === images.length - 1 && this.slideConfig.infinite) {
|
|
3907
3689
|
// the current image is the last one,
|
|
3908
3690
|
// so the next one is the first image
|
|
3909
3691
|
// because infinite is true
|
|
3910
|
-
return
|
|
3692
|
+
return images[0];
|
|
3911
3693
|
}
|
|
3912
3694
|
this.handleBoundaries(currentIndex);
|
|
3913
|
-
return
|
|
3695
|
+
return images[Math.min(currentIndex + 1, images.length - 1)];
|
|
3914
3696
|
}
|
|
3915
3697
|
/**
|
|
3916
3698
|
* Method called by events from both keyboard and mouse on an image.
|
|
@@ -3964,7 +3746,7 @@ class CurrentImageComponent extends AccessibleComponent {
|
|
|
3964
3746
|
}
|
|
3965
3747
|
const prevImage = this.getPrevImage();
|
|
3966
3748
|
this.loading = !prevImage.previouslyLoaded;
|
|
3967
|
-
this.changeImage.emit(new ImageModalEvent(this.id, action, getIndex(prevImage, this.images)));
|
|
3749
|
+
this.changeImage.emit(new ImageModalEvent(this.id(), action, getIndex(prevImage, this.images())));
|
|
3968
3750
|
this.start$.next();
|
|
3969
3751
|
}
|
|
3970
3752
|
/**
|
|
@@ -3974,12 +3756,13 @@ class CurrentImageComponent extends AccessibleComponent {
|
|
|
3974
3756
|
*/
|
|
3975
3757
|
nextImage(action = Action.NORMAL) {
|
|
3976
3758
|
// check if nextImage should be blocked
|
|
3977
|
-
|
|
3759
|
+
const images = this.images();
|
|
3760
|
+
if (this.isPreventSliding(images.length - 1)) {
|
|
3978
3761
|
return;
|
|
3979
3762
|
}
|
|
3980
3763
|
const nextImage = this.getNextImage();
|
|
3981
3764
|
this.loading = !nextImage.previouslyLoaded;
|
|
3982
|
-
this.changeImage.emit(new ImageModalEvent(this.id, action, getIndex(nextImage,
|
|
3765
|
+
this.changeImage.emit(new ImageModalEvent(this.id(), action, getIndex(nextImage, images)));
|
|
3983
3766
|
this.start$.next();
|
|
3984
3767
|
}
|
|
3985
3768
|
/**
|
|
@@ -3990,8 +3773,8 @@ class CurrentImageComponent extends AccessibleComponent {
|
|
|
3990
3773
|
onImageLoad(event) {
|
|
3991
3774
|
const loadImageData = {
|
|
3992
3775
|
status: true,
|
|
3993
|
-
index: getIndex(this.currentImage, this.images),
|
|
3994
|
-
id: this.currentImage.id
|
|
3776
|
+
index: getIndex(this.currentImage(), this.images()),
|
|
3777
|
+
id: this.currentImage().id
|
|
3995
3778
|
};
|
|
3996
3779
|
this.loadImage.emit(loadImageData);
|
|
3997
3780
|
this.loading = false;
|
|
@@ -4032,8 +3815,8 @@ class CurrentImageComponent extends AccessibleComponent {
|
|
|
4032
3815
|
* @param image image to get the index, or the visible image, if not passed
|
|
4033
3816
|
* @returns number the index of the image
|
|
4034
3817
|
*/
|
|
4035
|
-
getIndexToDelete(image = this.currentImage) {
|
|
4036
|
-
return getIndex(image, this.images);
|
|
3818
|
+
getIndexToDelete(image = this.currentImage()) {
|
|
3819
|
+
return getIndex(image, this.images());
|
|
4037
3820
|
}
|
|
4038
3821
|
/**
|
|
4039
3822
|
* Method to play modal gallery.
|
|
@@ -4060,7 +3843,8 @@ class CurrentImageComponent extends AccessibleComponent {
|
|
|
4060
3843
|
* @param currentIndex number is the index of the current image
|
|
4061
3844
|
*/
|
|
4062
3845
|
handleBoundaries(currentIndex) {
|
|
4063
|
-
|
|
3846
|
+
const images = this.images();
|
|
3847
|
+
if (images.length === 1) {
|
|
4064
3848
|
this.isFirstImage = true;
|
|
4065
3849
|
this.isLastImage = true;
|
|
4066
3850
|
this.ref.markForCheck();
|
|
@@ -4080,7 +3864,7 @@ class CurrentImageComponent extends AccessibleComponent {
|
|
|
4080
3864
|
this.isLastImage = false;
|
|
4081
3865
|
this.ref.markForCheck();
|
|
4082
3866
|
break;
|
|
4083
|
-
case
|
|
3867
|
+
case images.length - 1:
|
|
4084
3868
|
this.isFirstImage = false;
|
|
4085
3869
|
this.isLastImage = true;
|
|
4086
3870
|
this.ref.markForCheck();
|
|
@@ -4103,7 +3887,7 @@ class CurrentImageComponent extends AccessibleComponent {
|
|
|
4103
3887
|
* either the first or the last one.
|
|
4104
3888
|
*/
|
|
4105
3889
|
isPreventSliding(boundaryIndex) {
|
|
4106
|
-
return !!this.slideConfig && this.slideConfig.infinite === false && getIndex(this.currentImage, this.images) === boundaryIndex;
|
|
3890
|
+
return !!this.slideConfig && this.slideConfig.infinite === false && getIndex(this.currentImage(), this.images()) === boundaryIndex;
|
|
4107
3891
|
}
|
|
4108
3892
|
/**
|
|
4109
3893
|
* Private method to get the next index.
|
|
@@ -4111,15 +3895,15 @@ class CurrentImageComponent extends AccessibleComponent {
|
|
|
4111
3895
|
* That happens because all modal images are shown like in a circle.
|
|
4112
3896
|
*/
|
|
4113
3897
|
getNextImage() {
|
|
4114
|
-
const currentIndex = getIndex(this.currentImage, this.images);
|
|
3898
|
+
const currentIndex = getIndex(this.currentImage(), this.images());
|
|
4115
3899
|
let newIndex;
|
|
4116
|
-
if (currentIndex >= 0 && currentIndex < this.images.length - 1) {
|
|
3900
|
+
if (currentIndex >= 0 && currentIndex < this.images().length - 1) {
|
|
4117
3901
|
newIndex = currentIndex + 1;
|
|
4118
3902
|
}
|
|
4119
3903
|
else {
|
|
4120
3904
|
newIndex = 0; // start from the first index
|
|
4121
3905
|
}
|
|
4122
|
-
return this.images[newIndex];
|
|
3906
|
+
return this.images()[newIndex];
|
|
4123
3907
|
}
|
|
4124
3908
|
/**
|
|
4125
3909
|
* Private method to get the previous index.
|
|
@@ -4127,15 +3911,15 @@ class CurrentImageComponent extends AccessibleComponent {
|
|
|
4127
3911
|
* That happens because all modal images are shown like in a circle.
|
|
4128
3912
|
*/
|
|
4129
3913
|
getPrevImage() {
|
|
4130
|
-
const currentIndex = getIndex(this.currentImage, this.images);
|
|
3914
|
+
const currentIndex = getIndex(this.currentImage(), this.images());
|
|
4131
3915
|
let newIndex;
|
|
4132
|
-
if (currentIndex > 0 && currentIndex <= this.images.length - 1) {
|
|
3916
|
+
if (currentIndex > 0 && currentIndex <= this.images().length - 1) {
|
|
4133
3917
|
newIndex = currentIndex - 1;
|
|
4134
3918
|
}
|
|
4135
3919
|
else {
|
|
4136
|
-
newIndex = this.images.length - 1; // start from the last index
|
|
3920
|
+
newIndex = this.images().length - 1; // start from the last index
|
|
4137
3921
|
}
|
|
4138
|
-
return this.images[newIndex];
|
|
3922
|
+
return this.images()[newIndex];
|
|
4139
3923
|
}
|
|
4140
3924
|
/**
|
|
4141
3925
|
* Private method to build a text description.
|
|
@@ -4152,12 +3936,12 @@ class CurrentImageComponent extends AccessibleComponent {
|
|
|
4152
3936
|
if (this.currentImageConfig.description.customFullDescription && this.currentImageConfig.description.customFullDescription !== '') {
|
|
4153
3937
|
return this.currentImageConfig.description.customFullDescription;
|
|
4154
3938
|
}
|
|
4155
|
-
const currentIndex = getIndex(image, this.images);
|
|
3939
|
+
const currentIndex = getIndex(image, this.images());
|
|
4156
3940
|
// If the current image hasn't a description,
|
|
4157
3941
|
// prevent to write the ' - ' (or this.description.beforeTextDescription)
|
|
4158
3942
|
const prevDescription = this.currentImageConfig.description.imageText ? this.currentImageConfig.description.imageText : '';
|
|
4159
3943
|
const midSeparator = this.currentImageConfig.description.numberSeparator ? this.currentImageConfig.description.numberSeparator : '';
|
|
4160
|
-
const middleDescription = currentIndex + 1 + midSeparator + this.images.length;
|
|
3944
|
+
const middleDescription = currentIndex + 1 + midSeparator + this.images().length;
|
|
4161
3945
|
if (imageWithoutDescription) {
|
|
4162
3946
|
return prevDescription + middleDescription;
|
|
4163
3947
|
}
|
|
@@ -4170,8 +3954,8 @@ class CurrentImageComponent extends AccessibleComponent {
|
|
|
4170
3954
|
*/
|
|
4171
3955
|
updateIndexes() {
|
|
4172
3956
|
try {
|
|
4173
|
-
if (this.isOpen) {
|
|
4174
|
-
const index = getIndex(this.currentImage, this.images);
|
|
3957
|
+
if (this.isOpen()) {
|
|
3958
|
+
const index = getIndex(this.currentImage(), this.images());
|
|
4175
3959
|
this.handleBoundaries(index);
|
|
4176
3960
|
}
|
|
4177
3961
|
}
|
|
@@ -4180,33 +3964,14 @@ class CurrentImageComponent extends AccessibleComponent {
|
|
|
4180
3964
|
throw err;
|
|
4181
3965
|
}
|
|
4182
3966
|
}
|
|
4183
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: CurrentImageComponent, deps:
|
|
4184
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.7", type: CurrentImageComponent, isStandalone: true, selector: "ks-current-image", inputs: { id: "id", currentImage: "currentImage", images: "images", isOpen: "isOpen" }, outputs: { loadImage: "loadImage", changeImage: "changeImage", closeGallery: "closeGallery" }, host: { listeners: { "mouseenter": "onMouseEnter()", "mouseleave": "onMouseLeave()" } }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<main class=\"main-image-container\"\n ksKeyboardNavigation [isOpen]=\"isOpen\" (keyboardNavigation)=\"onKeyPress($event)\"\n [attr.aria-label]=\"accessibilityConfig?.mainContainerAriaLabel\"\n [title]=\"accessibilityConfig?.mainContainerTitle\">\n\n <div class=\"left-sub-container\">\n <a class=\"nav-left {{isFirstImage ? 'no-pointer' : ''}}\"\n [attr.aria-label]=\"accessibilityConfig?.mainPrevImageAriaLabel\"\n [tabIndex]=\"isFirstImage ? -1 : 0\" role=\"button\"\n (click)=\"onNavigationEvent('left', $event)\" (keyup)=\"onNavigationEvent('left', $event)\">\n <div class=\"inside {{isFirstImage ? 'empty-arrow-image' : 'left-arrow-image'}}\"\n aria-hidden=\"true\"\n [title]=\"isFirstImage ? '' : accessibilityConfig?.mainPrevImageTitle\"></div>\n </a>\n\n @let leftPreview = getLeftPreviewImage();\n @if (slideConfig?.sidePreviews?.show && leftPreview) {\n @if (!isFirstImage) {\n <img class=\"inside current-image-previous\"\n [loading]=\"leftPreview.loading\"\n [attr.fetchpriority]=\"leftPreview.fetchpriority\"\n [src]=\"leftPreview.plain?.img ? leftPreview.plain?.img : leftPreview.modal.img\"\n ksFallbackImage [fallbackImg]=\"leftPreview.plain?.fallbackImg ? leftPreview.plain?.fallbackImg : leftPreview.modal.fallbackImg\"\n [hidden]=\"loading\"\n ksSize [sizeConfig]=\"{width: slideConfig?.sidePreviews?.size.width, height: slideConfig?.sidePreviews?.size.height}\"\n [attr.aria-label]=\"leftPreview.modal.ariaLabel\"\n [title]=\"(leftPreview.modal.title || leftPreview.modal.title === '') ? leftPreview.modal.title : getDescriptionToDisplay(leftPreview)\"\n alt=\"{{leftPreview.modal.alt ? leftPreview.modal.alt : getAltDescriptionByImage(leftPreview)}}\"\n [tabIndex]=\"0\" role=\"img\"\n (click)=\"onNavigationEvent('left', $event, clickAction)\" (keyup)=\"onNavigationEvent('left', $event, keyboardAction)\" />\n } @else {\n <div class=\"current-image-previous hidden\"\n ksSize [sizeConfig]=\"{width: slideConfig?.sidePreviews?.size.width, height: slideConfig?.sidePreviews?.size.height}\"></div>\n }\n }\n </div>\n\n\n <figure id=\"current-figure\" [style.opacity]=\"loading ? '0' : '1'\">\n <picture class=\"current-image\">\n @for (source of currentImage.modal?.sources; let i = $index; track i) {\n <source [media]=\"source.media\" [srcset]=\"source.srcset\">\n }\n <img [id]=\"currentImage.id\"\n [loading]=\"currentImage.loading\"\n [attr.fetchpriority]=\"currentImage.fetchpriority\"\n class=\"inside\"\n [ngClass]=\"currentImageConfig?.navigateOnClick ? '' : 'unclickable'\"\n [src]=\"currentImage.modal.img\"\n ksFallbackImage [fallbackImg]=\"currentImage.modal.fallbackImg\"\n [attr.aria-label]=\"currentImage.modal.ariaLabel\"\n [title]=\"(currentImage.modal.title || currentImage.modal.title === '') ? currentImage.modal.title : getTitleToDisplay()\"\n alt=\"{{currentImage.modal.alt ? currentImage.modal.alt : getAltDescriptionByImage()}}\"\n [tabIndex]=\"0\" role=\"img\"\n (load)=\"onImageLoad($event)\"\n (click)=\"onImageEvent($event, clickAction)\" (keyup)=\"onImageEvent($event, keyboardAction)\"\n ksSwipe\n (swipeLeft)=\"swipe('swipeleft')\"\n (swipeRight)=\"swipe('swiperight')\" />\n </picture>\n @if (getDescriptionToDisplay() !== '') {\n <figcaption class=\"inside description\"\n ksDescription [description]=\"currentImageConfig?.description\"\n [innerHTML]=\"getDescriptionToDisplay()\">\n </figcaption>\n }\n </figure>\n\n <div class=\"right-sub-container\">\n @let rightPreview = getRightPreviewImage();\n @if (slideConfig?.sidePreviews?.show && leftPreview) {\n @if (!isLastImage) {\n <img class=\"inside current-image-next\"\n [loading]=\"rightPreview.loading\"\n [attr.fetchpriority]=\"rightPreview.fetchpriority\"\n [src]=\"rightPreview.plain?.img ? rightPreview.plain?.img : rightPreview.modal.img\"\n ksFallbackImage [fallbackImg]=\"rightPreview.plain?.fallbackImg ? rightPreview.plain?.fallbackImg : rightPreview.modal.fallbackImg\"\n [hidden]=\"loading\"\n ksSize [sizeConfig]=\"{width: slideConfig?.sidePreviews?.size.width, height: slideConfig?.sidePreviews?.size.height}\"\n [attr.aria-label]=\"rightPreview.modal.ariaLabel\"\n [title]=\"(rightPreview.modal.title || rightPreview.modal.title === '') ? rightPreview.modal.title : getDescriptionToDisplay(rightPreview)\"\n alt=\"{{rightPreview.modal.alt ? rightPreview.modal.alt : getAltDescriptionByImage(rightPreview)}}\"\n [tabIndex]=\"0\" role=\"img\"\n (click)=\"onNavigationEvent('right', $event, clickAction)\" (keyup)=\"onNavigationEvent('right', $event, keyboardAction)\" />\n } @else {\n <div class=\"current-image-next hidden\"\n ksSize [sizeConfig]=\"{width: slideConfig?.sidePreviews?.size.width, height: slideConfig?.sidePreviews?.size.height}\"></div>\n }\n }\n\n @if (loading && currentImageConfig?.loadingConfig?.enable) {\n <ks-loading-spinner [loadingConfig]=\"currentImageConfig?.loadingConfig\"\n [accessibilityConfig]=\"accessibilityConfig\"></ks-loading-spinner>\n }\n\n <a class=\"nav-right {{isFirstImage ? 'no-pointer' : ''}}\"\n [attr.aria-label]=\"accessibilityConfig?.mainNextImageAriaLabel\"\n [tabIndex]=\"isLastImage ? -1 : 0\" role=\"button\"\n (click)=\"onNavigationEvent('right', $event)\" (keyup)=\"onNavigationEvent('right', $event)\">\n <div class=\"inside {{isLastImage ? 'empty-arrow-image' : 'right-arrow-image'}}\"\n aria-hidden=\"true\"\n [title]=\"isLastImage ? '' : accessibilityConfig?.mainNextImageTitle\"></div>\n </a>\n </div>\n</main>\n", styles: [":host{display:flex;flex-direction:column;justify-content:center}.main-image-container{display:flex;flex-direction:row;align-items:center;justify-content:space-between}.main-image-container .nav,.main-image-container>.right-sub-container>.nav-right,.main-image-container>.left-sub-container>.nav-left{animation:animatezoom 1s;cursor:pointer;transition:all .5s}.main-image-container .nav:hover,.main-image-container>.right-sub-container>.nav-right:hover,.main-image-container>.left-sub-container>.nav-left:hover{transform:scale(1.1)}.main-image-container>.left-sub-container{display:flex;flex-direction:row;justify-content:space-around;align-items:center}.main-image-container>.left-sub-container>.nav-left{margin-right:5px;margin-left:15px}.main-image-container>.left-sub-container>.nav-left.no-pointer{cursor:default!important}.main-image-container>.right-sub-container{display:flex;flex-direction:row;justify-content:space-around;align-items:center}.main-image-container>.right-sub-container>.nav-right{margin-right:15px;margin-left:5px}.main-image-container>.right-sub-container>.nav-right.no-pointer{cursor:default!important}.main-image-container #current-figure{animation:fadein-visible .8s;text-align:center;margin:0;position:relative}.main-image-container #current-figure>.current-image{display:block}.main-image-container #current-figure>.current-image>img{max-width:100%;height:auto;display:block}.main-image-container #current-figure>.current-image>img.unclickable{cursor:not-allowed}.main-image-container #current-figure figcaption{padding:10px;position:absolute;bottom:0;left:0;right:0}.main-image-container #current-figure figcaption .description{font-weight:700;text-align:center}.current-image>img{height:auto;max-width:80vw;max-height:60vh;cursor:pointer}@media screen and (min-width: 70vw){.current-image>img{max-width:70vw}}@keyframes fadein-visible{0%{opacity:0}to{opacity:1}}@keyframes fadein-semi-visible05{0%{opacity:0}to{opacity:.5}}@keyframes fadein-semi-visible08{0%{opacity:0}to{opacity:.8}}@keyframes fadein-semi-visible09{0%{opacity:0}to{opacity:.9}}\n", ".arrow-image,.right-arrow-image,.left-arrow-image,.empty-arrow-image{width:30px;height:30px;background-size:30px}.empty-arrow-image{background:#000;opacity:0}.left-arrow-image{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/PjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4PSIwcHgiIHk9IjBweCIgdmlld0JveD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2lkdGg9IjUxMnB4IiBoZWlnaHQ9IjUxMnB4Ij48Zz48cGF0aCBkPSJNMzYwLjczMSwyMjkuMDc1bC0yMjUuMS0yMjUuMWMtNS4zLTUuMy0xMy44LTUuMy0xOS4xLDBzLTUuMywxMy44LDAsMTkuMWwyMTUuNSwyMTUuNWwtMjE1LjUsMjE1LjUgICBjLTUuMyw1LjMtNS4zLDEzLjgsMCwxOS4xYzIuNiwyLjYsNi4xLDQsOS41LDRjMy40LDAsNi45LTEuMyw5LjUtNGwyMjUuMS0yMjUuMUMzNjUuOTMxLDI0Mi44NzUsMzY1LjkzMSwyMzQuMjc1LDM2MC43MzEsMjI5LjA3NXogICAiIGZpbGw9IiNGRkZGRkYiLz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PC9zdmc+);opacity:.8;transition:all .5s}.right-arrow-image:hover{transform:scale(1.2)}\n", "@media only screen and (max-width: 1024px),only screen and (max-device-width: 1024px){.current-image-previous,.current-image-next{display:none}}@media only screen and (min-device-width: 1025px){.current-image-preview,.current-image-next,.current-image-previous{height:auto;cursor:pointer;opacity:.5;animation:fadein-semi-visible05 .8s;filter:alpha(opacity=50)}.current-image-preview:hover,.current-image-next:hover,.current-image-previous:hover{opacity:1;transition-property:opacity;transition:all .5s ease}.current-image-previous{margin-left:10px;margin-right:5px}.current-image-next{margin-right:10px;margin-left:5px}}@keyframes fadein-semi-visible05{0%{opacity:0}to{opacity:.5}}\n"], dependencies: [{ kind: "directive", type: KeyboardNavigationDirective, selector: "[ksKeyboardNavigation]", inputs: ["isOpen"], outputs: ["keyboardNavigation"] }, { kind: "directive", type: FallbackImageDirective, selector: "[ksFallbackImage]", inputs: ["fallbackImg"], outputs: ["fallbackApplied"] }, { kind: "directive", type: SizeDirective, selector: "[ksSize]", inputs: ["sizeConfig"] }, { kind: "directive", type: SwipeDirective, selector: "[ksSwipe]", outputs: ["swipeLeft", "swipeRight", "swipeUp", "swipeDown"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: DescriptionDirective, selector: "[ksDescription]", inputs: ["description"] }, { kind: "component", type: LoadingSpinnerComponent, selector: "ks-loading-spinner", inputs: ["loadingConfig", "accessibilityConfig"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3967
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: CurrentImageComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
3968
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.7", type: CurrentImageComponent, isStandalone: true, selector: "ks-current-image", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: true, transformFunction: null }, currentImage: { classPropertyName: "currentImage", publicName: "currentImage", isSignal: true, isRequired: true, transformFunction: null }, images: { classPropertyName: "images", publicName: "images", isSignal: true, isRequired: true, transformFunction: null }, isOpen: { classPropertyName: "isOpen", publicName: "isOpen", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { loadImage: "loadImage", changeImage: "changeImage", closeGallery: "closeGallery" }, host: { listeners: { "mouseenter": "onMouseEnter()", "mouseleave": "onMouseLeave()" } }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<main class=\"main-image-container\"\n ksKeyboardNavigation [isOpen]=\"isOpen()\" (keyboardNavigation)=\"onKeyPress($event)\"\n [attr.aria-label]=\"accessibilityConfig?.mainContainerAriaLabel\"\n [title]=\"accessibilityConfig?.mainContainerTitle\">\n\n <div class=\"left-sub-container\">\n <a class=\"nav-left {{isFirstImage ? 'no-pointer' : ''}}\"\n [attr.aria-label]=\"accessibilityConfig?.mainPrevImageAriaLabel\"\n [tabIndex]=\"isFirstImage ? -1 : 0\" role=\"button\"\n (click)=\"onNavigationEvent('left', $event)\" (keyup)=\"onNavigationEvent('left', $event)\">\n <div class=\"inside {{isFirstImage ? 'empty-arrow-image' : 'left-arrow-image'}}\"\n aria-hidden=\"true\"\n [title]=\"isFirstImage ? '' : accessibilityConfig?.mainPrevImageTitle\"></div>\n </a>\n\n @let leftPreview = getLeftPreviewImage();\n @if (slideConfig?.sidePreviews?.show && leftPreview) {\n @if (!isFirstImage) {\n <img class=\"inside current-image-previous\"\n loading=\"{{ leftPreview.loading }}\"\n [attr.fetchpriority]=\"leftPreview.fetchpriority\"\n [src]=\"leftPreview.plain?.img ? leftPreview.plain?.img : leftPreview.modal.img\"\n ksFallbackImage [fallbackImg]=\"leftPreview.plain?.fallbackImg ? leftPreview.plain?.fallbackImg : leftPreview.modal.fallbackImg\"\n [hidden]=\"loading\"\n ksSize [sizeConfig]=\"{width: slideConfig?.sidePreviews?.size?.width, height: slideConfig?.sidePreviews?.size?.height}\"\n [attr.aria-label]=\"leftPreview.modal.ariaLabel\"\n [title]=\"(leftPreview.modal.title || leftPreview.modal.title === '') ? leftPreview.modal.title : getDescriptionToDisplay(leftPreview)\"\n alt=\"{{leftPreview.modal.alt ? leftPreview.modal.alt : getAltDescriptionByImage(leftPreview)}}\"\n [tabIndex]=\"0\" role=\"img\"\n (click)=\"onNavigationEvent('left', $event, clickAction)\" (keyup)=\"onNavigationEvent('left', $event, keyboardAction)\" />\n } @else {\n <div class=\"current-image-previous hidden\"\n ksSize [sizeConfig]=\"{width: slideConfig?.sidePreviews?.size?.width, height: slideConfig?.sidePreviews?.size?.height}\"></div>\n }\n }\n </div>\n\n\n <figure id=\"current-figure\" [style.opacity]=\"loading ? '0' : '1'\">\n <picture class=\"current-image\">\n @for (source of currentImage().modal?.sources; let i = $index; track i) {\n <source [media]=\"source.media\" [srcset]=\"source.srcset\">\n }\n <img [id]=\"currentImage().id\"\n loading=\"{{ currentImage().loading }}\"\n [attr.fetchpriority]=\"currentImage().fetchpriority\"\n class=\"inside\"\n [ngClass]=\"currentImageConfig?.navigateOnClick ? '' : 'unclickable'\"\n [src]=\"currentImage().modal.img\"\n ksFallbackImage [fallbackImg]=\"currentImage().modal.fallbackImg\"\n [attr.aria-label]=\"currentImage().modal.ariaLabel\"\n [title]=\"(currentImage().modal.title || currentImage().modal.title === '') ? currentImage().modal.title : getTitleToDisplay()\"\n alt=\"{{currentImage().modal.alt ? currentImage().modal.alt : getAltDescriptionByImage()}}\"\n [tabIndex]=\"0\" role=\"img\"\n (load)=\"onImageLoad($event)\"\n (click)=\"onImageEvent($event, clickAction)\" (keyup)=\"onImageEvent($event, keyboardAction)\"\n ksSwipe\n (swipeLeft)=\"swipe('swipeleft')\"\n (swipeRight)=\"swipe('swiperight')\" />\n </picture>\n @if (getDescriptionToDisplay() !== '') {\n <figcaption class=\"inside description\"\n ksDescription [description]=\"currentImageConfig?.description\"\n [innerHTML]=\"getDescriptionToDisplay()\">\n </figcaption>\n }\n </figure>\n\n <div class=\"right-sub-container\">\n @let rightPreview = getRightPreviewImage();\n @if (slideConfig?.sidePreviews?.show && leftPreview) {\n @if (!isLastImage) {\n <img class=\"inside current-image-next\"\n loading=\"{{ rightPreview.loading }}\"\n [attr.fetchpriority]=\"rightPreview.fetchpriority\"\n [src]=\"rightPreview.plain?.img ? rightPreview.plain?.img : rightPreview.modal.img\"\n ksFallbackImage [fallbackImg]=\"rightPreview.plain?.fallbackImg ? rightPreview.plain?.fallbackImg : rightPreview.modal.fallbackImg\"\n [hidden]=\"loading\"\n ksSize [sizeConfig]=\"{width: slideConfig?.sidePreviews?.size?.width, height: slideConfig?.sidePreviews?.size?.height}\"\n [attr.aria-label]=\"rightPreview.modal.ariaLabel\"\n [title]=\"(rightPreview.modal.title || rightPreview.modal.title === '') ? rightPreview.modal.title : getDescriptionToDisplay(rightPreview)\"\n alt=\"{{rightPreview.modal.alt ? rightPreview.modal.alt : getAltDescriptionByImage(rightPreview)}}\"\n [tabIndex]=\"0\" role=\"img\"\n (click)=\"onNavigationEvent('right', $event, clickAction)\" (keyup)=\"onNavigationEvent('right', $event, keyboardAction)\" />\n } @else {\n <div class=\"current-image-next hidden\"\n ksSize [sizeConfig]=\"{width: slideConfig?.sidePreviews?.size?.width, height: slideConfig?.sidePreviews?.size?.height}\"></div>\n }\n }\n\n @if (loading && currentImageConfig?.loadingConfig?.enable) {\n <ks-loading-spinner [loadingConfig]=\"currentImageConfig?.loadingConfig\"\n [accessibilityConfig]=\"accessibilityConfig\" />\n }\n\n <a class=\"nav-right {{isFirstImage ? 'no-pointer' : ''}}\"\n [attr.aria-label]=\"accessibilityConfig?.mainNextImageAriaLabel\"\n [tabIndex]=\"isLastImage ? -1 : 0\" role=\"button\"\n (click)=\"onNavigationEvent('right', $event)\" (keyup)=\"onNavigationEvent('right', $event)\">\n <div class=\"inside {{isLastImage ? 'empty-arrow-image' : 'right-arrow-image'}}\"\n aria-hidden=\"true\"\n [title]=\"isLastImage ? '' : accessibilityConfig?.mainNextImageTitle\"></div>\n </a>\n </div>\n</main>\n", styles: [":host{display:flex;flex-direction:column;justify-content:center}.main-image-container{display:flex;flex-direction:row;align-items:center;justify-content:space-between}.main-image-container .nav,.main-image-container>.right-sub-container>.nav-right,.main-image-container>.left-sub-container>.nav-left{animation:animatezoom 1s;cursor:pointer;transition:all .5s}.main-image-container .nav:hover,.main-image-container>.right-sub-container>.nav-right:hover,.main-image-container>.left-sub-container>.nav-left:hover{transform:scale(1.1)}.main-image-container>.left-sub-container{display:flex;flex-direction:row;justify-content:space-around;align-items:center}.main-image-container>.left-sub-container>.nav-left{margin-right:5px;margin-left:15px}.main-image-container>.left-sub-container>.nav-left.no-pointer{cursor:default!important}.main-image-container>.right-sub-container{display:flex;flex-direction:row;justify-content:space-around;align-items:center}.main-image-container>.right-sub-container>.nav-right{margin-right:15px;margin-left:5px}.main-image-container>.right-sub-container>.nav-right.no-pointer{cursor:default!important}.main-image-container #current-figure{animation:fadein-visible .8s;text-align:center;margin:0;position:relative}.main-image-container #current-figure>.current-image{display:block}.main-image-container #current-figure>.current-image>img{max-width:100%;height:auto;display:block}.main-image-container #current-figure>.current-image>img.unclickable{cursor:not-allowed}.main-image-container #current-figure figcaption{padding:10px;position:absolute;bottom:0;left:0;right:0}.main-image-container #current-figure figcaption .description{font-weight:700;text-align:center}.current-image>img{height:auto;max-width:80vw;max-height:60vh;cursor:pointer}@media screen and (min-width: 70vw){.current-image>img{max-width:70vw}}@keyframes fadein-visible{0%{opacity:0}to{opacity:1}}@keyframes fadein-semi-visible05{0%{opacity:0}to{opacity:.5}}@keyframes fadein-semi-visible08{0%{opacity:0}to{opacity:.8}}@keyframes fadein-semi-visible09{0%{opacity:0}to{opacity:.9}}\n", ".arrow-image,.right-arrow-image,.left-arrow-image,.empty-arrow-image{width:30px;height:30px;background-size:30px}.empty-arrow-image{background:#000;opacity:0}.left-arrow-image{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/PjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4PSIwcHgiIHk9IjBweCIgdmlld0JveD0iMCAwIDQ3Ny4xNzUgNDc3LjE3NSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgNDc3LjE3NSA0NzcuMTc1OyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIgd2lkdGg9IjUxMnB4IiBoZWlnaHQ9IjUxMnB4Ij48Zz48cGF0aCBkPSJNMTQ1LjE4OCwyMzguNTc1bDIxNS41LTIxNS41YzUuMy01LjMsNS4zLTEzLjgsMC0xOS4xcy0xMy44LTUuMy0xOS4xLDBsLTIyNS4xLDIyNS4xYy01LjMsNS4zLTUuMywxMy44LDAsMTkuMWwyMjUuMSwyMjUgICBjMi42LDIuNiw2LjEsNCw5LjUsNHM2LjktMS4zLDkuNS00YzUuMy01LjMsNS4zLTEzLjgsMC0xOS4xTDE0NS4xODgsMjM4LjU3NXoiIGZpbGw9IiNGRkZGRkYiLz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PC9zdmc+);opacity:.8;transition:all .5s}.left-arrow-image:hover{transform:scale(1.2)}.right-arrow-image{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/PjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4PSIwcHgiIHk9IjBweCIgdmlld0JveD0iMCAwIDQ3Ny4xNzUgNDc3LjE3NSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgNDc3LjE3NSA0NzcuMTc1OyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIgd2lkdGg9IjUxMnB4IiBoZWlnaHQ9IjUxMnB4Ij48Zz48cGF0aCBkPSJNMzYwLjczMSwyMjkuMDc1bC0yMjUuMS0yMjUuMWMtNS4zLTUuMy0xMy44LTUuMy0xOS4xLDBzLTUuMywxMy44LDAsMTkuMWwyMTUuNSwyMTUuNWwtMjE1LjUsMjE1LjUgICBjLTUuMyw1LjMtNS4zLDEzLjgsMCwxOS4xYzIuNiwyLjYsNi4xLDQsOS41LDRjMy40LDAsNi45LTEuMyw5LjUtNGwyMjUuMS0yMjUuMUMzNjUuOTMxLDI0Mi44NzUsMzY1LjkzMSwyMzQuMjc1LDM2MC43MzEsMjI5LjA3NXogICAiIGZpbGw9IiNGRkZGRkYiLz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PC9zdmc+);opacity:.8;transition:all .5s}.right-arrow-image:hover{transform:scale(1.2)}\n", "@media only screen and (max-width: 1024px),only screen and (max-device-width: 1024px){.current-image-previous,.current-image-next{display:none}}@media only screen and (min-device-width: 1025px){.current-image-preview,.current-image-next,.current-image-previous{height:auto;cursor:pointer;opacity:.5;animation:fadein-semi-visible05 .8s;filter:alpha(opacity=50)}.current-image-preview:hover,.current-image-next:hover,.current-image-previous:hover{opacity:1;transition-property:opacity;transition:all .5s ease}.current-image-previous{margin-left:10px;margin-right:5px}.current-image-next{margin-right:10px;margin-left:5px}}@keyframes fadein-semi-visible05{0%{opacity:0}to{opacity:.5}}\n"], dependencies: [{ kind: "directive", type: KeyboardNavigationDirective, selector: "[ksKeyboardNavigation]", inputs: ["isOpen"], outputs: ["keyboardNavigation"] }, { kind: "directive", type: FallbackImageDirective, selector: "[ksFallbackImage]", inputs: ["fallbackImg"], outputs: ["fallbackApplied"] }, { kind: "directive", type: SizeDirective, selector: "[ksSize]", inputs: ["sizeConfig"] }, { kind: "directive", type: SwipeDirective, selector: "[ksSwipe]", outputs: ["swipeLeft", "swipeRight", "swipeUp", "swipeDown"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: DescriptionDirective, selector: "[ksDescription]", inputs: ["description"] }, { kind: "component", type: LoadingSpinnerComponent, selector: "ks-loading-spinner", inputs: ["loadingConfig", "accessibilityConfig"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
4185
3969
|
}
|
|
4186
3970
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: CurrentImageComponent, decorators: [{
|
|
4187
3971
|
type: Component,
|
|
4188
3972
|
args: [{ selector: 'ks-current-image', changeDetection: ChangeDetectionStrategy.OnPush, imports: [KeyboardNavigationDirective, FallbackImageDirective, SizeDirective,
|
|
4189
|
-
SwipeDirective, NgClass, DescriptionDirective, LoadingSpinnerComponent], template: "<main class=\"main-image-container\"\n ksKeyboardNavigation [isOpen]=\"isOpen\" (keyboardNavigation)=\"onKeyPress($event)\"\n [attr.aria-label]=\"accessibilityConfig?.mainContainerAriaLabel\"\n [title]=\"accessibilityConfig?.mainContainerTitle\">\n\n <div class=\"left-sub-container\">\n <a class=\"nav-left {{isFirstImage ? 'no-pointer' : ''}}\"\n [attr.aria-label]=\"accessibilityConfig?.mainPrevImageAriaLabel\"\n [tabIndex]=\"isFirstImage ? -1 : 0\" role=\"button\"\n (click)=\"onNavigationEvent('left', $event)\" (keyup)=\"onNavigationEvent('left', $event)\">\n <div class=\"inside {{isFirstImage ? 'empty-arrow-image' : 'left-arrow-image'}}\"\n aria-hidden=\"true\"\n [title]=\"isFirstImage ? '' : accessibilityConfig?.mainPrevImageTitle\"></div>\n </a>\n\n @let leftPreview = getLeftPreviewImage();\n @if (slideConfig?.sidePreviews?.show && leftPreview) {\n @if (!isFirstImage) {\n <img class=\"inside current-image-previous\"\n [loading]=\"leftPreview.loading\"\n [attr.fetchpriority]=\"leftPreview.fetchpriority\"\n [src]=\"leftPreview.plain?.img ? leftPreview.plain?.img : leftPreview.modal.img\"\n ksFallbackImage [fallbackImg]=\"leftPreview.plain?.fallbackImg ? leftPreview.plain?.fallbackImg : leftPreview.modal.fallbackImg\"\n [hidden]=\"loading\"\n ksSize [sizeConfig]=\"{width: slideConfig?.sidePreviews?.size.width, height: slideConfig?.sidePreviews?.size.height}\"\n [attr.aria-label]=\"leftPreview.modal.ariaLabel\"\n [title]=\"(leftPreview.modal.title || leftPreview.modal.title === '') ? leftPreview.modal.title : getDescriptionToDisplay(leftPreview)\"\n alt=\"{{leftPreview.modal.alt ? leftPreview.modal.alt : getAltDescriptionByImage(leftPreview)}}\"\n [tabIndex]=\"0\" role=\"img\"\n (click)=\"onNavigationEvent('left', $event, clickAction)\" (keyup)=\"onNavigationEvent('left', $event, keyboardAction)\" />\n } @else {\n <div class=\"current-image-previous hidden\"\n ksSize [sizeConfig]=\"{width: slideConfig?.sidePreviews?.size.width, height: slideConfig?.sidePreviews?.size.height}\"></div>\n }\n }\n </div>\n\n\n <figure id=\"current-figure\" [style.opacity]=\"loading ? '0' : '1'\">\n <picture class=\"current-image\">\n @for (source of currentImage.modal?.sources; let i = $index; track i) {\n <source [media]=\"source.media\" [srcset]=\"source.srcset\">\n }\n <img [id]=\"currentImage.id\"\n [loading]=\"currentImage.loading\"\n [attr.fetchpriority]=\"currentImage.fetchpriority\"\n class=\"inside\"\n [ngClass]=\"currentImageConfig?.navigateOnClick ? '' : 'unclickable'\"\n [src]=\"currentImage.modal.img\"\n ksFallbackImage [fallbackImg]=\"currentImage.modal.fallbackImg\"\n [attr.aria-label]=\"currentImage.modal.ariaLabel\"\n [title]=\"(currentImage.modal.title || currentImage.modal.title === '') ? currentImage.modal.title : getTitleToDisplay()\"\n alt=\"{{currentImage.modal.alt ? currentImage.modal.alt : getAltDescriptionByImage()}}\"\n [tabIndex]=\"0\" role=\"img\"\n (load)=\"onImageLoad($event)\"\n (click)=\"onImageEvent($event, clickAction)\" (keyup)=\"onImageEvent($event, keyboardAction)\"\n ksSwipe\n (swipeLeft)=\"swipe('swipeleft')\"\n (swipeRight)=\"swipe('swiperight')\" />\n </picture>\n @if (getDescriptionToDisplay() !== '') {\n <figcaption class=\"inside description\"\n ksDescription [description]=\"currentImageConfig?.description\"\n [innerHTML]=\"getDescriptionToDisplay()\">\n </figcaption>\n }\n </figure>\n\n <div class=\"right-sub-container\">\n @let rightPreview = getRightPreviewImage();\n @if (slideConfig?.sidePreviews?.show && leftPreview) {\n @if (!isLastImage) {\n <img class=\"inside current-image-next\"\n [loading]=\"rightPreview.loading\"\n [attr.fetchpriority]=\"rightPreview.fetchpriority\"\n [src]=\"rightPreview.plain?.img ? rightPreview.plain?.img : rightPreview.modal.img\"\n ksFallbackImage [fallbackImg]=\"rightPreview.plain?.fallbackImg ? rightPreview.plain?.fallbackImg : rightPreview.modal.fallbackImg\"\n [hidden]=\"loading\"\n ksSize [sizeConfig]=\"{width: slideConfig?.sidePreviews?.size.width, height: slideConfig?.sidePreviews?.size.height}\"\n [attr.aria-label]=\"rightPreview.modal.ariaLabel\"\n [title]=\"(rightPreview.modal.title || rightPreview.modal.title === '') ? rightPreview.modal.title : getDescriptionToDisplay(rightPreview)\"\n alt=\"{{rightPreview.modal.alt ? rightPreview.modal.alt : getAltDescriptionByImage(rightPreview)}}\"\n [tabIndex]=\"0\" role=\"img\"\n (click)=\"onNavigationEvent('right', $event, clickAction)\" (keyup)=\"onNavigationEvent('right', $event, keyboardAction)\" />\n } @else {\n <div class=\"current-image-next hidden\"\n ksSize [sizeConfig]=\"{width: slideConfig?.sidePreviews?.size.width, height: slideConfig?.sidePreviews?.size.height}\"></div>\n }\n }\n\n @if (loading && currentImageConfig?.loadingConfig?.enable) {\n <ks-loading-spinner [loadingConfig]=\"currentImageConfig?.loadingConfig\"\n [accessibilityConfig]=\"accessibilityConfig\"></ks-loading-spinner>\n }\n\n <a class=\"nav-right {{isFirstImage ? 'no-pointer' : ''}}\"\n [attr.aria-label]=\"accessibilityConfig?.mainNextImageAriaLabel\"\n [tabIndex]=\"isLastImage ? -1 : 0\" role=\"button\"\n (click)=\"onNavigationEvent('right', $event)\" (keyup)=\"onNavigationEvent('right', $event)\">\n <div class=\"inside {{isLastImage ? 'empty-arrow-image' : 'right-arrow-image'}}\"\n aria-hidden=\"true\"\n [title]=\"isLastImage ? '' : accessibilityConfig?.mainNextImageTitle\"></div>\n </a>\n </div>\n</main>\n", styles: [":host{display:flex;flex-direction:column;justify-content:center}.main-image-container{display:flex;flex-direction:row;align-items:center;justify-content:space-between}.main-image-container .nav,.main-image-container>.right-sub-container>.nav-right,.main-image-container>.left-sub-container>.nav-left{animation:animatezoom 1s;cursor:pointer;transition:all .5s}.main-image-container .nav:hover,.main-image-container>.right-sub-container>.nav-right:hover,.main-image-container>.left-sub-container>.nav-left:hover{transform:scale(1.1)}.main-image-container>.left-sub-container{display:flex;flex-direction:row;justify-content:space-around;align-items:center}.main-image-container>.left-sub-container>.nav-left{margin-right:5px;margin-left:15px}.main-image-container>.left-sub-container>.nav-left.no-pointer{cursor:default!important}.main-image-container>.right-sub-container{display:flex;flex-direction:row;justify-content:space-around;align-items:center}.main-image-container>.right-sub-container>.nav-right{margin-right:15px;margin-left:5px}.main-image-container>.right-sub-container>.nav-right.no-pointer{cursor:default!important}.main-image-container #current-figure{animation:fadein-visible .8s;text-align:center;margin:0;position:relative}.main-image-container #current-figure>.current-image{display:block}.main-image-container #current-figure>.current-image>img{max-width:100%;height:auto;display:block}.main-image-container #current-figure>.current-image>img.unclickable{cursor:not-allowed}.main-image-container #current-figure figcaption{padding:10px;position:absolute;bottom:0;left:0;right:0}.main-image-container #current-figure figcaption .description{font-weight:700;text-align:center}.current-image>img{height:auto;max-width:80vw;max-height:60vh;cursor:pointer}@media screen and (min-width: 70vw){.current-image>img{max-width:70vw}}@keyframes fadein-visible{0%{opacity:0}to{opacity:1}}@keyframes fadein-semi-visible05{0%{opacity:0}to{opacity:.5}}@keyframes fadein-semi-visible08{0%{opacity:0}to{opacity:.8}}@keyframes fadein-semi-visible09{0%{opacity:0}to{opacity:.9}}\n", ".arrow-image,.right-arrow-image,.left-arrow-image,.empty-arrow-image{width:30px;height:30px;background-size:30px}.empty-arrow-image{background:#000;opacity:0}.left-arrow-image{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/PjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4PSIwcHgiIHk9IjBweCIgdmlld0JveD0iMCAwIDQ3Ny4xNzUgNDc3LjE3NSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgNDc3LjE3NSA0NzcuMTc1OyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIgd2lkdGg9IjUxMnB4IiBoZWlnaHQ9IjUxMnB4Ij48Zz48cGF0aCBkPSJNMTQ1LjE4OCwyMzguNTc1bDIxNS41LTIxNS41YzUuMy01LjMsNS4zLTEzLjgsMC0xOS4xcy0xMy44LTUuMy0xOS4xLDBsLTIyNS4xLDIyNS4xYy01LjMsNS4zLTUuMywxMy44LDAsMTkuMWwyMjUuMSwyMjUgICBjMi42LDIuNiw2LjEsNCw5LjUsNHM2LjktMS4zLDkuNS00YzUuMy01LjMsNS4zLTEzLjgsMC0xOS4xTDE0NS4xODgsMjM4LjU3NXoiIGZpbGw9IiNGRkZGRkYiLz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PC9zdmc+);opacity:.8;transition:all .5s}.left-arrow-image:hover{transform:scale(1.2)}.right-arrow-image{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/PjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4PSIwcHgiIHk9IjBweCIgdmlld0JveD0iMCAwIDQ3Ny4xNzUgNDc3LjE3NSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgNDc3LjE3NSA0NzcuMTc1OyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIgd2lkdGg9IjUxMnB4IiBoZWlnaHQ9IjUxMnB4Ij48Zz48cGF0aCBkPSJNMzYwLjczMSwyMjkuMDc1bC0yMjUuMS0yMjUuMWMtNS4zLTUuMy0xMy44LTUuMy0xOS4xLDBzLTUuMywxMy44LDAsMTkuMWwyMTUuNSwyMTUuNWwtMjE1LjUsMjE1LjUgICBjLTUuMyw1LjMtNS4zLDEzLjgsMCwxOS4xYzIuNiwyLjYsNi4xLDQsOS41LDRjMy40LDAsNi45LTEuMyw5LjUtNGwyMjUuMS0yMjUuMUMzNjUuOTMxLDI0Mi44NzUsMzY1LjkzMSwyMzQuMjc1LDM2MC43MzEsMjI5LjA3NXogICAiIGZpbGw9IiNGRkZGRkYiLz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PC9zdmc+);opacity:.8;transition:all .5s}.right-arrow-image:hover{transform:scale(1.2)}\n", "@media only screen and (max-width: 1024px),only screen and (max-device-width: 1024px){.current-image-previous,.current-image-next{display:none}}@media only screen and (min-device-width: 1025px){.current-image-preview,.current-image-next,.current-image-previous{height:auto;cursor:pointer;opacity:.5;animation:fadein-semi-visible05 .8s;filter:alpha(opacity=50)}.current-image-preview:hover,.current-image-next:hover,.current-image-previous:hover{opacity:1;transition-property:opacity;transition:all .5s ease}.current-image-previous{margin-left:10px;margin-right:5px}.current-image-next{margin-right:10px;margin-left:5px}}@keyframes fadein-semi-visible05{0%{opacity:0}to{opacity:.5}}\n"] }]
|
|
4190
|
-
}],
|
|
4191
|
-
type: Inject,
|
|
4192
|
-
args: [PLATFORM_ID]
|
|
4193
|
-
}] }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }, { type: ConfigService }], propDecorators: { id: [{
|
|
4194
|
-
type: Input
|
|
4195
|
-
}], currentImage: [{
|
|
4196
|
-
type: Input
|
|
4197
|
-
}], images: [{
|
|
4198
|
-
type: Input
|
|
4199
|
-
}],
|
|
4200
|
-
// @ts-ignore
|
|
4201
|
-
isOpen: [{
|
|
4202
|
-
type: Input
|
|
4203
|
-
}], loadImage: [{
|
|
4204
|
-
type: Output
|
|
4205
|
-
}], changeImage: [{
|
|
4206
|
-
type: Output
|
|
4207
|
-
}], closeGallery: [{
|
|
4208
|
-
type: Output
|
|
4209
|
-
}], onMouseEnter: [{
|
|
3973
|
+
SwipeDirective, NgClass, DescriptionDirective, LoadingSpinnerComponent], template: "<main class=\"main-image-container\"\n ksKeyboardNavigation [isOpen]=\"isOpen()\" (keyboardNavigation)=\"onKeyPress($event)\"\n [attr.aria-label]=\"accessibilityConfig?.mainContainerAriaLabel\"\n [title]=\"accessibilityConfig?.mainContainerTitle\">\n\n <div class=\"left-sub-container\">\n <a class=\"nav-left {{isFirstImage ? 'no-pointer' : ''}}\"\n [attr.aria-label]=\"accessibilityConfig?.mainPrevImageAriaLabel\"\n [tabIndex]=\"isFirstImage ? -1 : 0\" role=\"button\"\n (click)=\"onNavigationEvent('left', $event)\" (keyup)=\"onNavigationEvent('left', $event)\">\n <div class=\"inside {{isFirstImage ? 'empty-arrow-image' : 'left-arrow-image'}}\"\n aria-hidden=\"true\"\n [title]=\"isFirstImage ? '' : accessibilityConfig?.mainPrevImageTitle\"></div>\n </a>\n\n @let leftPreview = getLeftPreviewImage();\n @if (slideConfig?.sidePreviews?.show && leftPreview) {\n @if (!isFirstImage) {\n <img class=\"inside current-image-previous\"\n loading=\"{{ leftPreview.loading }}\"\n [attr.fetchpriority]=\"leftPreview.fetchpriority\"\n [src]=\"leftPreview.plain?.img ? leftPreview.plain?.img : leftPreview.modal.img\"\n ksFallbackImage [fallbackImg]=\"leftPreview.plain?.fallbackImg ? leftPreview.plain?.fallbackImg : leftPreview.modal.fallbackImg\"\n [hidden]=\"loading\"\n ksSize [sizeConfig]=\"{width: slideConfig?.sidePreviews?.size?.width, height: slideConfig?.sidePreviews?.size?.height}\"\n [attr.aria-label]=\"leftPreview.modal.ariaLabel\"\n [title]=\"(leftPreview.modal.title || leftPreview.modal.title === '') ? leftPreview.modal.title : getDescriptionToDisplay(leftPreview)\"\n alt=\"{{leftPreview.modal.alt ? leftPreview.modal.alt : getAltDescriptionByImage(leftPreview)}}\"\n [tabIndex]=\"0\" role=\"img\"\n (click)=\"onNavigationEvent('left', $event, clickAction)\" (keyup)=\"onNavigationEvent('left', $event, keyboardAction)\" />\n } @else {\n <div class=\"current-image-previous hidden\"\n ksSize [sizeConfig]=\"{width: slideConfig?.sidePreviews?.size?.width, height: slideConfig?.sidePreviews?.size?.height}\"></div>\n }\n }\n </div>\n\n\n <figure id=\"current-figure\" [style.opacity]=\"loading ? '0' : '1'\">\n <picture class=\"current-image\">\n @for (source of currentImage().modal?.sources; let i = $index; track i) {\n <source [media]=\"source.media\" [srcset]=\"source.srcset\">\n }\n <img [id]=\"currentImage().id\"\n loading=\"{{ currentImage().loading }}\"\n [attr.fetchpriority]=\"currentImage().fetchpriority\"\n class=\"inside\"\n [ngClass]=\"currentImageConfig?.navigateOnClick ? '' : 'unclickable'\"\n [src]=\"currentImage().modal.img\"\n ksFallbackImage [fallbackImg]=\"currentImage().modal.fallbackImg\"\n [attr.aria-label]=\"currentImage().modal.ariaLabel\"\n [title]=\"(currentImage().modal.title || currentImage().modal.title === '') ? currentImage().modal.title : getTitleToDisplay()\"\n alt=\"{{currentImage().modal.alt ? currentImage().modal.alt : getAltDescriptionByImage()}}\"\n [tabIndex]=\"0\" role=\"img\"\n (load)=\"onImageLoad($event)\"\n (click)=\"onImageEvent($event, clickAction)\" (keyup)=\"onImageEvent($event, keyboardAction)\"\n ksSwipe\n (swipeLeft)=\"swipe('swipeleft')\"\n (swipeRight)=\"swipe('swiperight')\" />\n </picture>\n @if (getDescriptionToDisplay() !== '') {\n <figcaption class=\"inside description\"\n ksDescription [description]=\"currentImageConfig?.description\"\n [innerHTML]=\"getDescriptionToDisplay()\">\n </figcaption>\n }\n </figure>\n\n <div class=\"right-sub-container\">\n @let rightPreview = getRightPreviewImage();\n @if (slideConfig?.sidePreviews?.show && leftPreview) {\n @if (!isLastImage) {\n <img class=\"inside current-image-next\"\n loading=\"{{ rightPreview.loading }}\"\n [attr.fetchpriority]=\"rightPreview.fetchpriority\"\n [src]=\"rightPreview.plain?.img ? rightPreview.plain?.img : rightPreview.modal.img\"\n ksFallbackImage [fallbackImg]=\"rightPreview.plain?.fallbackImg ? rightPreview.plain?.fallbackImg : rightPreview.modal.fallbackImg\"\n [hidden]=\"loading\"\n ksSize [sizeConfig]=\"{width: slideConfig?.sidePreviews?.size?.width, height: slideConfig?.sidePreviews?.size?.height}\"\n [attr.aria-label]=\"rightPreview.modal.ariaLabel\"\n [title]=\"(rightPreview.modal.title || rightPreview.modal.title === '') ? rightPreview.modal.title : getDescriptionToDisplay(rightPreview)\"\n alt=\"{{rightPreview.modal.alt ? rightPreview.modal.alt : getAltDescriptionByImage(rightPreview)}}\"\n [tabIndex]=\"0\" role=\"img\"\n (click)=\"onNavigationEvent('right', $event, clickAction)\" (keyup)=\"onNavigationEvent('right', $event, keyboardAction)\" />\n } @else {\n <div class=\"current-image-next hidden\"\n ksSize [sizeConfig]=\"{width: slideConfig?.sidePreviews?.size?.width, height: slideConfig?.sidePreviews?.size?.height}\"></div>\n }\n }\n\n @if (loading && currentImageConfig?.loadingConfig?.enable) {\n <ks-loading-spinner [loadingConfig]=\"currentImageConfig?.loadingConfig\"\n [accessibilityConfig]=\"accessibilityConfig\" />\n }\n\n <a class=\"nav-right {{isFirstImage ? 'no-pointer' : ''}}\"\n [attr.aria-label]=\"accessibilityConfig?.mainNextImageAriaLabel\"\n [tabIndex]=\"isLastImage ? -1 : 0\" role=\"button\"\n (click)=\"onNavigationEvent('right', $event)\" (keyup)=\"onNavigationEvent('right', $event)\">\n <div class=\"inside {{isLastImage ? 'empty-arrow-image' : 'right-arrow-image'}}\"\n aria-hidden=\"true\"\n [title]=\"isLastImage ? '' : accessibilityConfig?.mainNextImageTitle\"></div>\n </a>\n </div>\n</main>\n", styles: [":host{display:flex;flex-direction:column;justify-content:center}.main-image-container{display:flex;flex-direction:row;align-items:center;justify-content:space-between}.main-image-container .nav,.main-image-container>.right-sub-container>.nav-right,.main-image-container>.left-sub-container>.nav-left{animation:animatezoom 1s;cursor:pointer;transition:all .5s}.main-image-container .nav:hover,.main-image-container>.right-sub-container>.nav-right:hover,.main-image-container>.left-sub-container>.nav-left:hover{transform:scale(1.1)}.main-image-container>.left-sub-container{display:flex;flex-direction:row;justify-content:space-around;align-items:center}.main-image-container>.left-sub-container>.nav-left{margin-right:5px;margin-left:15px}.main-image-container>.left-sub-container>.nav-left.no-pointer{cursor:default!important}.main-image-container>.right-sub-container{display:flex;flex-direction:row;justify-content:space-around;align-items:center}.main-image-container>.right-sub-container>.nav-right{margin-right:15px;margin-left:5px}.main-image-container>.right-sub-container>.nav-right.no-pointer{cursor:default!important}.main-image-container #current-figure{animation:fadein-visible .8s;text-align:center;margin:0;position:relative}.main-image-container #current-figure>.current-image{display:block}.main-image-container #current-figure>.current-image>img{max-width:100%;height:auto;display:block}.main-image-container #current-figure>.current-image>img.unclickable{cursor:not-allowed}.main-image-container #current-figure figcaption{padding:10px;position:absolute;bottom:0;left:0;right:0}.main-image-container #current-figure figcaption .description{font-weight:700;text-align:center}.current-image>img{height:auto;max-width:80vw;max-height:60vh;cursor:pointer}@media screen and (min-width: 70vw){.current-image>img{max-width:70vw}}@keyframes fadein-visible{0%{opacity:0}to{opacity:1}}@keyframes fadein-semi-visible05{0%{opacity:0}to{opacity:.5}}@keyframes fadein-semi-visible08{0%{opacity:0}to{opacity:.8}}@keyframes fadein-semi-visible09{0%{opacity:0}to{opacity:.9}}\n", ".arrow-image,.right-arrow-image,.left-arrow-image,.empty-arrow-image{width:30px;height:30px;background-size:30px}.empty-arrow-image{background:#000;opacity:0}.left-arrow-image{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/PjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4PSIwcHgiIHk9IjBweCIgdmlld0JveD0iMCAwIDQ3Ny4xNzUgNDc3LjE3NSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgNDc3LjE3NSA0NzcuMTc1OyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIgd2lkdGg9IjUxMnB4IiBoZWlnaHQ9IjUxMnB4Ij48Zz48cGF0aCBkPSJNMTQ1LjE4OCwyMzguNTc1bDIxNS41LTIxNS41YzUuMy01LjMsNS4zLTEzLjgsMC0xOS4xcy0xMy44LTUuMy0xOS4xLDBsLTIyNS4xLDIyNS4xYy01LjMsNS4zLTUuMywxMy44LDAsMTkuMWwyMjUuMSwyMjUgICBjMi42LDIuNiw2LjEsNCw5LjUsNHM2LjktMS4zLDkuNS00YzUuMy01LjMsNS4zLTEzLjgsMC0xOS4xTDE0NS4xODgsMjM4LjU3NXoiIGZpbGw9IiNGRkZGRkYiLz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PC9zdmc+);opacity:.8;transition:all .5s}.left-arrow-image:hover{transform:scale(1.2)}.right-arrow-image{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/PjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4PSIwcHgiIHk9IjBweCIgdmlld0JveD0iMCAwIDQ3Ny4xNzUgNDc3LjE3NSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgNDc3LjE3NSA0NzcuMTc1OyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIgd2lkdGg9IjUxMnB4IiBoZWlnaHQ9IjUxMnB4Ij48Zz48cGF0aCBkPSJNMzYwLjczMSwyMjkuMDc1bC0yMjUuMS0yMjUuMWMtNS4zLTUuMy0xMy44LTUuMy0xOS4xLDBzLTUuMywxMy44LDAsMTkuMWwyMTUuNSwyMTUuNWwtMjE1LjUsMjE1LjUgICBjLTUuMyw1LjMtNS4zLDEzLjgsMCwxOS4xYzIuNiwyLjYsNi4xLDQsOS41LDRjMy40LDAsNi45LTEuMyw5LjUtNGwyMjUuMS0yMjUuMUMzNjUuOTMxLDI0Mi44NzUsMzY1LjkzMSwyMzQuMjc1LDM2MC43MzEsMjI5LjA3NXogICAiIGZpbGw9IiNGRkZGRkYiLz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PGc+PC9nPjxnPjwvZz48Zz48L2c+PC9zdmc+);opacity:.8;transition:all .5s}.right-arrow-image:hover{transform:scale(1.2)}\n", "@media only screen and (max-width: 1024px),only screen and (max-device-width: 1024px){.current-image-previous,.current-image-next{display:none}}@media only screen and (min-device-width: 1025px){.current-image-preview,.current-image-next,.current-image-previous{height:auto;cursor:pointer;opacity:.5;animation:fadein-semi-visible05 .8s;filter:alpha(opacity=50)}.current-image-preview:hover,.current-image-next:hover,.current-image-previous:hover{opacity:1;transition-property:opacity;transition:all .5s ease}.current-image-previous{margin-left:10px;margin-right:5px}.current-image-next{margin-right:10px;margin-left:5px}}@keyframes fadein-semi-visible05{0%{opacity:0}to{opacity:.5}}\n"] }]
|
|
3974
|
+
}], propDecorators: { onMouseEnter: [{
|
|
4210
3975
|
type: HostListener,
|
|
4211
3976
|
args: ['mouseenter']
|
|
4212
3977
|
}], onMouseLeave: [{
|
|
@@ -4241,9 +4006,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImpor
|
|
|
4241
4006
|
* Directive to change the flex-wrap css property of an element.
|
|
4242
4007
|
*/
|
|
4243
4008
|
class WrapDirective {
|
|
4244
|
-
constructor(
|
|
4245
|
-
|
|
4246
|
-
|
|
4009
|
+
constructor() {
|
|
4010
|
+
/**
|
|
4011
|
+
* Boolean input that it's true to add 'flex-wrap: wrap', 'flex-wrap: nowrap' otherwise.
|
|
4012
|
+
*/
|
|
4013
|
+
this.wrap = input.required(...(ngDevMode ? [{ debugName: "wrap" }] : []));
|
|
4014
|
+
/**
|
|
4015
|
+
* String input to force the width of the element to be able to see wrapping.
|
|
4016
|
+
*/
|
|
4017
|
+
this.width = input.required(...(ngDevMode ? [{ debugName: "width" }] : []));
|
|
4018
|
+
this.renderer = inject(Renderer2);
|
|
4019
|
+
this.el = inject(ElementRef);
|
|
4247
4020
|
}
|
|
4248
4021
|
/**
|
|
4249
4022
|
* Method ´ngOnInit´ to apply the style of this directive.
|
|
@@ -4265,24 +4038,16 @@ class WrapDirective {
|
|
|
4265
4038
|
* Private method to change both width and flex-wrap css properties.
|
|
4266
4039
|
*/
|
|
4267
4040
|
applyStyle() {
|
|
4268
|
-
|
|
4269
|
-
|
|
4270
|
-
return;
|
|
4271
|
-
}
|
|
4272
|
-
this.renderer.setStyle(this.el.nativeElement, 'width', this.width);
|
|
4273
|
-
this.renderer.setStyle(this.el.nativeElement, 'flex-wrap', this.wrap ? 'wrap' : 'nowrap');
|
|
4041
|
+
this.renderer.setStyle(this.el.nativeElement, 'width', this.width());
|
|
4042
|
+
this.renderer.setStyle(this.el.nativeElement, 'flex-wrap', this.wrap() ? 'wrap' : 'nowrap');
|
|
4274
4043
|
}
|
|
4275
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: WrapDirective, deps: [
|
|
4276
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
4044
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: WrapDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
4045
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.1.7", type: WrapDirective, isStandalone: true, selector: "[ksWrap]", inputs: { wrap: { classPropertyName: "wrap", publicName: "wrap", isSignal: true, isRequired: true, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: true, transformFunction: null } }, usesOnChanges: true, ngImport: i0 }); }
|
|
4277
4046
|
}
|
|
4278
4047
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: WrapDirective, decorators: [{
|
|
4279
4048
|
type: Directive,
|
|
4280
4049
|
args: [{ selector: '[ksWrap]' }]
|
|
4281
|
-
}]
|
|
4282
|
-
type: Input
|
|
4283
|
-
}], width: [{
|
|
4284
|
-
type: Input
|
|
4285
|
-
}] } });
|
|
4050
|
+
}] });
|
|
4286
4051
|
|
|
4287
4052
|
/*
|
|
4288
4053
|
The MIT License (MIT)
|
|
@@ -4311,9 +4076,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImpor
|
|
|
4311
4076
|
* Directive to change the flex-direction of an element, based on two inputs (`direction` and `justify`).
|
|
4312
4077
|
*/
|
|
4313
4078
|
class DirectionDirective {
|
|
4314
|
-
constructor(
|
|
4315
|
-
|
|
4316
|
-
|
|
4079
|
+
constructor() {
|
|
4080
|
+
/**
|
|
4081
|
+
* String input to set the css flex-direction of an element.
|
|
4082
|
+
*/
|
|
4083
|
+
this.direction = input(...(ngDevMode ? [undefined, { debugName: "direction" }] : []));
|
|
4084
|
+
/**
|
|
4085
|
+
* String input to set the css justify-content of an element.
|
|
4086
|
+
*/
|
|
4087
|
+
this.justify = input(...(ngDevMode ? [undefined, { debugName: "justify" }] : []));
|
|
4088
|
+
this.renderer = inject(Renderer2);
|
|
4089
|
+
this.el = inject(ElementRef);
|
|
4317
4090
|
}
|
|
4318
4091
|
/**
|
|
4319
4092
|
* Method ´ngOnInit´ to apply the style of this directive.
|
|
@@ -4335,23 +4108,21 @@ class DirectionDirective {
|
|
|
4335
4108
|
* Private method to change both direction and justify of an element.
|
|
4336
4109
|
*/
|
|
4337
4110
|
applyStyle() {
|
|
4338
|
-
|
|
4111
|
+
const direction = this.direction();
|
|
4112
|
+
const justify = this.justify();
|
|
4113
|
+
if (!direction || !justify) {
|
|
4339
4114
|
return;
|
|
4340
4115
|
}
|
|
4341
|
-
this.renderer.setStyle(this.el.nativeElement, 'flex-direction',
|
|
4342
|
-
this.renderer.setStyle(this.el.nativeElement, 'justify-content',
|
|
4116
|
+
this.renderer.setStyle(this.el.nativeElement, 'flex-direction', direction);
|
|
4117
|
+
this.renderer.setStyle(this.el.nativeElement, 'justify-content', justify);
|
|
4343
4118
|
}
|
|
4344
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: DirectionDirective, deps: [
|
|
4345
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
4119
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: DirectionDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
4120
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.1.7", type: DirectionDirective, isStandalone: true, selector: "[ksDirection]", inputs: { direction: { classPropertyName: "direction", publicName: "direction", isSignal: true, isRequired: false, transformFunction: null }, justify: { classPropertyName: "justify", publicName: "justify", isSignal: true, isRequired: false, transformFunction: null } }, usesOnChanges: true, ngImport: i0 }); }
|
|
4346
4121
|
}
|
|
4347
4122
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: DirectionDirective, decorators: [{
|
|
4348
4123
|
type: Directive,
|
|
4349
4124
|
args: [{ selector: '[ksDirection]' }]
|
|
4350
|
-
}]
|
|
4351
|
-
type: Input
|
|
4352
|
-
}], justify: [{
|
|
4353
|
-
type: Input
|
|
4354
|
-
}] } });
|
|
4125
|
+
}] });
|
|
4355
4126
|
|
|
4356
4127
|
/*
|
|
4357
4128
|
The MIT License (MIT)
|
|
@@ -4380,9 +4151,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImpor
|
|
|
4380
4151
|
* Directive to add an image to an `<a>` tag with some additional custom properties.
|
|
4381
4152
|
*/
|
|
4382
4153
|
class ATagBgImageDirective {
|
|
4383
|
-
constructor(
|
|
4384
|
-
|
|
4385
|
-
|
|
4154
|
+
constructor() {
|
|
4155
|
+
/**
|
|
4156
|
+
* Object of type `Image` that represents the image to add to the `<a>` tag.
|
|
4157
|
+
*/
|
|
4158
|
+
this.image = input.required(...(ngDevMode ? [{ debugName: "image" }] : []));
|
|
4159
|
+
/**
|
|
4160
|
+
* Additional style to customize the background attribute.
|
|
4161
|
+
* Empty string by default.
|
|
4162
|
+
*/
|
|
4163
|
+
this.style = input(...(ngDevMode ? [undefined, { debugName: "style" }] : []));
|
|
4164
|
+
this.renderer = inject(Renderer2);
|
|
4165
|
+
this.el = inject(ElementRef);
|
|
4386
4166
|
}
|
|
4387
4167
|
/**
|
|
4388
4168
|
* Method ´ngOnInit´ to apply the style of this directive.
|
|
@@ -4404,28 +4184,25 @@ class ATagBgImageDirective {
|
|
|
4404
4184
|
* Private method to add an image as background of an `<a>` tag.
|
|
4405
4185
|
*/
|
|
4406
4186
|
applyStyle() {
|
|
4407
|
-
|
|
4187
|
+
const image = this.image();
|
|
4188
|
+
if (!image || (!image.plain && !image.modal)) {
|
|
4408
4189
|
return;
|
|
4409
4190
|
}
|
|
4410
|
-
const imgPath =
|
|
4411
|
-
let bg = `url("${imgPath}") ${this.style}`;
|
|
4412
|
-
const fallbackImgPath =
|
|
4191
|
+
const imgPath = image.plain && image.plain.img ? image.plain.img : image.modal.img;
|
|
4192
|
+
let bg = `url("${imgPath}") ${this.style()}`;
|
|
4193
|
+
const fallbackImgPath = image.plain && image.plain.fallbackImg ? image.plain.fallbackImg : image.modal.fallbackImg;
|
|
4413
4194
|
if (!!fallbackImgPath) {
|
|
4414
|
-
bg += `, url("${fallbackImgPath}") ${this.style}`;
|
|
4195
|
+
bg += `, url("${fallbackImgPath}") ${this.style()}`;
|
|
4415
4196
|
}
|
|
4416
4197
|
this.renderer.setStyle(this.el.nativeElement, 'background', bg);
|
|
4417
4198
|
}
|
|
4418
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: ATagBgImageDirective, deps: [
|
|
4419
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
4199
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: ATagBgImageDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
4200
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.1.7", type: ATagBgImageDirective, isStandalone: true, selector: "[ksATagBgImage]", inputs: { image: { classPropertyName: "image", publicName: "image", isSignal: true, isRequired: true, transformFunction: null }, style: { classPropertyName: "style", publicName: "style", isSignal: true, isRequired: false, transformFunction: null } }, usesOnChanges: true, ngImport: i0 }); }
|
|
4420
4201
|
}
|
|
4421
4202
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: ATagBgImageDirective, decorators: [{
|
|
4422
4203
|
type: Directive,
|
|
4423
4204
|
args: [{ selector: '[ksATagBgImage]' }]
|
|
4424
|
-
}]
|
|
4425
|
-
type: Input
|
|
4426
|
-
}], style: [{
|
|
4427
|
-
type: Input
|
|
4428
|
-
}] } });
|
|
4205
|
+
}] });
|
|
4429
4206
|
|
|
4430
4207
|
/*
|
|
4431
4208
|
The MIT License (MIT)
|
|
@@ -4458,17 +4235,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImpor
|
|
|
4458
4235
|
* Also, it emits click events as outputs.
|
|
4459
4236
|
*/
|
|
4460
4237
|
class PlainGalleryComponent extends AccessibleComponent {
|
|
4461
|
-
constructor(
|
|
4462
|
-
super();
|
|
4463
|
-
|
|
4238
|
+
constructor() {
|
|
4239
|
+
super(...arguments);
|
|
4240
|
+
/**
|
|
4241
|
+
* Unique id (>=0) of the current instance of this library. This is required when you are using
|
|
4242
|
+
* the service to call modal gallery.
|
|
4243
|
+
*/
|
|
4244
|
+
this.id = input(...(ngDevMode ? [undefined, { debugName: "id" }] : []));
|
|
4464
4245
|
/**
|
|
4465
4246
|
* Array of `Image` that represent the model of this library with all images, thumbs and so on.
|
|
4466
4247
|
*/
|
|
4467
|
-
this.images = [];
|
|
4248
|
+
this.images = input([], ...(ngDevMode ? [{ debugName: "images" }] : []));
|
|
4249
|
+
/**
|
|
4250
|
+
* PlainLibConfig object to configure plain-gallery.
|
|
4251
|
+
*/
|
|
4252
|
+
this.config = input(...(ngDevMode ? [undefined, { debugName: "config" }] : []));
|
|
4468
4253
|
/**
|
|
4469
4254
|
* Output to emit an event when an image is clicked.
|
|
4470
4255
|
*/
|
|
4471
|
-
this.clickImage =
|
|
4256
|
+
this.clickImage = output();
|
|
4472
4257
|
/**
|
|
4473
4258
|
* Bi-dimensional array of `Image` object to store images to display as plain gallery.
|
|
4474
4259
|
* [] by default.
|
|
@@ -4485,6 +4270,7 @@ class PlainGalleryComponent extends AccessibleComponent {
|
|
|
4485
4270
|
* In this way, `wrapStyle` (flex-wrap css property) will be used as requested.
|
|
4486
4271
|
*/
|
|
4487
4272
|
this.widthStyle = '';
|
|
4273
|
+
this.configService = inject(ConfigService);
|
|
4488
4274
|
}
|
|
4489
4275
|
/**
|
|
4490
4276
|
* Method ´ngOnInit´ to init both `configPlainGallery` calling `initPlainGalleryConfig()`
|
|
@@ -4493,11 +4279,12 @@ class PlainGalleryComponent extends AccessibleComponent {
|
|
|
4493
4279
|
* In particular, it's called only one time!!!
|
|
4494
4280
|
*/
|
|
4495
4281
|
ngOnInit() {
|
|
4496
|
-
|
|
4282
|
+
const id = this.id();
|
|
4283
|
+
if (id === null || id === undefined) {
|
|
4497
4284
|
throw new Error('Internal library error - id must be defined');
|
|
4498
4285
|
}
|
|
4499
|
-
this.configService.setConfig(
|
|
4500
|
-
const libConfig = this.configService.getConfig(
|
|
4286
|
+
this.configService.setConfig(id, this.config());
|
|
4287
|
+
const libConfig = this.configService.getConfig(id);
|
|
4501
4288
|
if (!libConfig) {
|
|
4502
4289
|
throw new Error('Internal library error - libConfig must be defined');
|
|
4503
4290
|
}
|
|
@@ -4511,10 +4298,11 @@ class PlainGalleryComponent extends AccessibleComponent {
|
|
|
4511
4298
|
* In particular, it's called when any data-bound property of a directive changes!!!
|
|
4512
4299
|
*/
|
|
4513
4300
|
ngOnChanges(changes) {
|
|
4514
|
-
|
|
4301
|
+
const id = this.id();
|
|
4302
|
+
if (id === null || id === undefined) {
|
|
4515
4303
|
throw new Error('Internal library error - id must be defined');
|
|
4516
4304
|
}
|
|
4517
|
-
const libConfig = this.configService.getConfig(
|
|
4305
|
+
const libConfig = this.configService.getConfig(id);
|
|
4518
4306
|
if (!libConfig) {
|
|
4519
4307
|
throw new Error('Internal library error - libConfig must be defined');
|
|
4520
4308
|
}
|
|
@@ -4538,7 +4326,7 @@ class PlainGalleryComponent extends AccessibleComponent {
|
|
|
4538
4326
|
* @param img is the Image to show
|
|
4539
4327
|
*/
|
|
4540
4328
|
showModalGalleryByImage(img) {
|
|
4541
|
-
const index = this.images.findIndex((val) => val && img && val.id === img.id);
|
|
4329
|
+
const index = this.images().findIndex((val) => val && img && val.id === img.id);
|
|
4542
4330
|
this.showModalGallery(index);
|
|
4543
4331
|
}
|
|
4544
4332
|
/**
|
|
@@ -4563,7 +4351,7 @@ class PlainGalleryComponent extends AccessibleComponent {
|
|
|
4563
4351
|
if (!image) {
|
|
4564
4352
|
return '';
|
|
4565
4353
|
}
|
|
4566
|
-
return image.plain && image.plain.description ? image.plain.description : `Image ${getIndex(image, this.images) + 1}`;
|
|
4354
|
+
return image.plain && image.plain.description ? image.plain.description : `Image ${getIndex(image, this.images()) + 1}`;
|
|
4567
4355
|
}
|
|
4568
4356
|
/**
|
|
4569
4357
|
* Method to get the title for an image.
|
|
@@ -4578,8 +4366,8 @@ class PlainGalleryComponent extends AccessibleComponent {
|
|
|
4578
4366
|
else if (image.modal && image.modal.description) {
|
|
4579
4367
|
description = image.modal.description;
|
|
4580
4368
|
}
|
|
4581
|
-
const currentIndex = getIndex(image, this.images);
|
|
4582
|
-
const prevDescription = 'Image ' + (currentIndex + 1) + '/' + this.images.length;
|
|
4369
|
+
const currentIndex = getIndex(image, this.images());
|
|
4370
|
+
const prevDescription = 'Image ' + (currentIndex + 1) + '/' + this.images().length;
|
|
4583
4371
|
let currImgDescription = description ? description : '';
|
|
4584
4372
|
if (currImgDescription !== '') {
|
|
4585
4373
|
currImgDescription = ' - ' + currImgDescription;
|
|
@@ -4606,7 +4394,7 @@ class PlainGalleryComponent extends AccessibleComponent {
|
|
|
4606
4394
|
this.imageGrid = [];
|
|
4607
4395
|
if (this.plainGalleryConfig.layout instanceof LineLayout) {
|
|
4608
4396
|
const layout = this.plainGalleryConfig.layout;
|
|
4609
|
-
const row = this.images.filter((val, i) => i < layout.breakConfig.length || layout.breakConfig.length === -1);
|
|
4397
|
+
const row = this.images().filter((val, i) => i < layout.breakConfig.length || layout.breakConfig.length === -1);
|
|
4610
4398
|
this.imageGrid = [row];
|
|
4611
4399
|
this.size = this.plainGalleryConfig.layout.size;
|
|
4612
4400
|
switch (this.plainGalleryConfig.strategy) {
|
|
@@ -4622,37 +4410,31 @@ class PlainGalleryComponent extends AccessibleComponent {
|
|
|
4622
4410
|
}
|
|
4623
4411
|
if (this.plainGalleryConfig.layout instanceof GridLayout) {
|
|
4624
4412
|
const layout = this.plainGalleryConfig.layout;
|
|
4625
|
-
const count = Math.ceil(this.images.length / layout.breakConfig.length);
|
|
4413
|
+
const count = Math.ceil(this.images().length / layout.breakConfig.length);
|
|
4626
4414
|
let start = 0;
|
|
4627
4415
|
let end = layout.breakConfig.length - 1;
|
|
4628
4416
|
for (let j = 0; j < count; j++) {
|
|
4629
|
-
const row = this.images.filter((val, i) => i >= start && i <= end);
|
|
4417
|
+
const row = this.images().filter((val, i) => i >= start && i <= end);
|
|
4630
4418
|
this.imageGrid.push(row);
|
|
4631
4419
|
start = end + 1;
|
|
4632
4420
|
end = start + layout.breakConfig.length - 1;
|
|
4633
4421
|
}
|
|
4634
4422
|
this.size = this.plainGalleryConfig.layout.size;
|
|
4635
|
-
|
|
4636
|
-
|
|
4423
|
+
if (layout.size.width) {
|
|
4424
|
+
const pixels = +(layout.size.width).replace('px', '');
|
|
4425
|
+
this.widthStyle = pixels * layout.breakConfig.length + pixels / 2 + 'px';
|
|
4426
|
+
}
|
|
4637
4427
|
this.wrapStyle = layout.breakConfig.wrap;
|
|
4638
4428
|
this.directionStyle = 'row';
|
|
4639
4429
|
}
|
|
4640
4430
|
}
|
|
4641
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: PlainGalleryComponent, deps:
|
|
4642
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.7", type: PlainGalleryComponent, isStandalone: true, selector: "ks-plain-gallery", inputs: { id: "id", images: "images", config: "config" }, outputs: { clickImage: "clickImage" }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div class=\"plain-container\"\n ksWrap [wrap]=\"wrapStyle\" [width]=\"widthStyle\"\n ksDirection [direction]=\"directionStyle\" [justify]=\"justifyStyle\"\n [attr.aria-label]=\"accessibilityConfig?.plainGalleryContentAriaLabel\"\n [title]=\"accessibilityConfig?.plainGalleryContentTitle\">\n\n @for (imgRow of imageGrid; let i = $index; track i) {\n @for (imgCol of imgRow; let j = $index; track j) {\n @if (!plainGalleryConfig?.advanced?.aTags) {\n @if (imgCol?.modal?.img) {\n <img
|
|
4431
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: PlainGalleryComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
4432
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.7", type: PlainGalleryComponent, isStandalone: true, selector: "ks-plain-gallery", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, images: { classPropertyName: "images", publicName: "images", isSignal: true, isRequired: false, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { clickImage: "clickImage" }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div class=\"plain-container\"\n ksWrap [wrap]=\"wrapStyle\" [width]=\"widthStyle\"\n ksDirection [direction]=\"directionStyle\" [justify]=\"justifyStyle\"\n [attr.aria-label]=\"accessibilityConfig?.plainGalleryContentAriaLabel\"\n [title]=\"accessibilityConfig?.plainGalleryContentTitle\">\n\n @for (imgRow of imageGrid; let i = $index; track i) {\n @for (imgCol of imgRow; let j = $index; track j) {\n @if (!plainGalleryConfig?.advanced?.aTags) {\n @if (imgCol?.modal?.img) {\n <img loading=\"{{imgCol.loading}}\"\n [attr.fetchpriority]=\"imgCol.fetchpriority\"\n [src]=\"imgCol.plain?.img! ? imgCol.plain?.img! : imgCol.modal.img\"\n ksFallbackImage [fallbackImg]=\"imgCol.plain?.fallbackImg ? imgCol.plain?.fallbackImg : imgCol.modal.fallbackImg\"\n class=\"image\"\n ksSize [sizeConfig]=\"{width: size?.width!, height: size?.height!}\"\n [attr.aria-label]=\"imgCol.plain?.ariaLabel\"\n [title]=\"(imgCol.plain?.title || imgCol.plain?.title === '') ? imgCol.plain?.title : getTitleDisplay(imgCol)\"\n alt=\"{{imgCol.plain?.alt! ? imgCol.plain?.alt! : getAltPlainDescriptionByImage(imgCol)}}\"\n [tabIndex]=\"0\" role=\"img\"\n (click)=\"showModalGalleryByImage(imgCol)\" (keyup)=\"onNavigationEvent($event, imgCol)\" />\n }\n } @else {\n <!-- Add directive to set background with the image url as param to pass thumb or img-->\n <!-- to do something like this <a style=\"background: url('path to image') 50% 50%/cover\">.-->\n @if (imgCol?.modal?.img) {\n <a class=\"a-tag-image\"\n ksATagBgImage [image]=\"imgCol\" [style]=\"plainGalleryConfig?.advanced?.additionalBackground\"\n ksSize [sizeConfig]=\"{width: size?.width!, height: size?.height!}\"\n [attr.aria-label]=\"imgCol.plain?.ariaLabel\"\n [title]=\"(imgCol.plain?.title || imgCol.plain?.title === '') ? imgCol.plain?.title : getTitleDisplay(imgCol)\"\n [tabIndex]=\"0\"\n (click)=\"showModalGalleryByImage(imgCol)\" (keyup)=\"onNavigationEvent($event, imgCol)\"></a>\n }\n }\n }\n }\n\n</div>\n\n", styles: [".plain-container{align-items:center;display:flex}.plain-container .image{cursor:pointer;height:auto;margin:2px;width:50px}.plain-container .a-tag-image{cursor:pointer;margin:2px}\n"], dependencies: [{ kind: "directive", type: WrapDirective, selector: "[ksWrap]", inputs: ["wrap", "width"] }, { kind: "directive", type: DirectionDirective, selector: "[ksDirection]", inputs: ["direction", "justify"] }, { kind: "directive", type: FallbackImageDirective, selector: "[ksFallbackImage]", inputs: ["fallbackImg"], outputs: ["fallbackApplied"] }, { kind: "directive", type: SizeDirective, selector: "[ksSize]", inputs: ["sizeConfig"] }, { kind: "directive", type: ATagBgImageDirective, selector: "[ksATagBgImage]", inputs: ["image", "style"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
4643
4433
|
}
|
|
4644
4434
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: PlainGalleryComponent, decorators: [{
|
|
4645
4435
|
type: Component,
|
|
4646
|
-
args: [{ selector: 'ks-plain-gallery', changeDetection: ChangeDetectionStrategy.OnPush, imports: [WrapDirective, DirectionDirective, FallbackImageDirective, SizeDirective, ATagBgImageDirective], template: "<div class=\"plain-container\"\n ksWrap [wrap]=\"wrapStyle\" [width]=\"widthStyle\"\n ksDirection [direction]=\"directionStyle\" [justify]=\"justifyStyle\"\n [attr.aria-label]=\"accessibilityConfig?.plainGalleryContentAriaLabel\"\n [title]=\"accessibilityConfig?.plainGalleryContentTitle\">\n\n @for (imgRow of imageGrid; let i = $index; track i) {\n @for (imgCol of imgRow; let j = $index; track j) {\n @if (!plainGalleryConfig?.advanced?.aTags) {\n @if (imgCol?.modal?.img) {\n <img
|
|
4647
|
-
}]
|
|
4648
|
-
type: Input
|
|
4649
|
-
}], images: [{
|
|
4650
|
-
type: Input
|
|
4651
|
-
}], config: [{
|
|
4652
|
-
type: Input
|
|
4653
|
-
}], clickImage: [{
|
|
4654
|
-
type: Output
|
|
4655
|
-
}] } });
|
|
4436
|
+
args: [{ selector: 'ks-plain-gallery', changeDetection: ChangeDetectionStrategy.OnPush, imports: [WrapDirective, DirectionDirective, FallbackImageDirective, SizeDirective, ATagBgImageDirective], template: "<div class=\"plain-container\"\n ksWrap [wrap]=\"wrapStyle\" [width]=\"widthStyle\"\n ksDirection [direction]=\"directionStyle\" [justify]=\"justifyStyle\"\n [attr.aria-label]=\"accessibilityConfig?.plainGalleryContentAriaLabel\"\n [title]=\"accessibilityConfig?.plainGalleryContentTitle\">\n\n @for (imgRow of imageGrid; let i = $index; track i) {\n @for (imgCol of imgRow; let j = $index; track j) {\n @if (!plainGalleryConfig?.advanced?.aTags) {\n @if (imgCol?.modal?.img) {\n <img loading=\"{{imgCol.loading}}\"\n [attr.fetchpriority]=\"imgCol.fetchpriority\"\n [src]=\"imgCol.plain?.img! ? imgCol.plain?.img! : imgCol.modal.img\"\n ksFallbackImage [fallbackImg]=\"imgCol.plain?.fallbackImg ? imgCol.plain?.fallbackImg : imgCol.modal.fallbackImg\"\n class=\"image\"\n ksSize [sizeConfig]=\"{width: size?.width!, height: size?.height!}\"\n [attr.aria-label]=\"imgCol.plain?.ariaLabel\"\n [title]=\"(imgCol.plain?.title || imgCol.plain?.title === '') ? imgCol.plain?.title : getTitleDisplay(imgCol)\"\n alt=\"{{imgCol.plain?.alt! ? imgCol.plain?.alt! : getAltPlainDescriptionByImage(imgCol)}}\"\n [tabIndex]=\"0\" role=\"img\"\n (click)=\"showModalGalleryByImage(imgCol)\" (keyup)=\"onNavigationEvent($event, imgCol)\" />\n }\n } @else {\n <!-- Add directive to set background with the image url as param to pass thumb or img-->\n <!-- to do something like this <a style=\"background: url('path to image') 50% 50%/cover\">.-->\n @if (imgCol?.modal?.img) {\n <a class=\"a-tag-image\"\n ksATagBgImage [image]=\"imgCol\" [style]=\"plainGalleryConfig?.advanced?.additionalBackground\"\n ksSize [sizeConfig]=\"{width: size?.width!, height: size?.height!}\"\n [attr.aria-label]=\"imgCol.plain?.ariaLabel\"\n [title]=\"(imgCol.plain?.title || imgCol.plain?.title === '') ? imgCol.plain?.title : getTitleDisplay(imgCol)\"\n [tabIndex]=\"0\"\n (click)=\"showModalGalleryByImage(imgCol)\" (keyup)=\"onNavigationEvent($event, imgCol)\"></a>\n }\n }\n }\n }\n\n</div>\n\n", styles: [".plain-container{align-items:center;display:flex}.plain-container .image{cursor:pointer;height:auto;margin:2px;width:50px}.plain-container .a-tag-image{cursor:pointer;margin:2px}\n"] }]
|
|
4437
|
+
}] });
|
|
4656
4438
|
|
|
4657
4439
|
/*
|
|
4658
4440
|
The MIT License (MIT)
|
|
@@ -4679,93 +4461,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImpor
|
|
|
4679
4461
|
*/
|
|
4680
4462
|
const DIALOG_DATA = new InjectionToken('DIALOG_DATA');
|
|
4681
4463
|
|
|
4682
|
-
/*
|
|
4683
|
-
The MIT License (MIT)
|
|
4684
|
-
|
|
4685
|
-
Copyright (c) 2017-2025 Stefano Cappa (Ks89)
|
|
4686
|
-
|
|
4687
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
4688
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
4689
|
-
in the Software without restriction, including without limitation the rights
|
|
4690
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
4691
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
4692
|
-
furnished to do so, subject to the following conditions:
|
|
4693
|
-
|
|
4694
|
-
The above copyright notice and this permission notice shall be included in all
|
|
4695
|
-
copies or substantial portions of the Software.
|
|
4696
|
-
|
|
4697
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
4698
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
4699
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL THE
|
|
4700
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
4701
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
4702
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
4703
|
-
SOFTWARE.
|
|
4704
|
-
*/
|
|
4705
|
-
/**
|
|
4706
|
-
* Directive to close the modal gallery clicking on the semi-transparent background.
|
|
4707
|
-
* In fact, it listens for a click on all elements that aren't 'inside' and it emits
|
|
4708
|
-
* an event using `@Output clickOutside`.
|
|
4709
|
-
*/
|
|
4710
|
-
class ClickOutsideDirective {
|
|
4711
|
-
constructor() {
|
|
4712
|
-
/**
|
|
4713
|
-
* Output to emit an event if the clicked element class doesn't contain 'inside' or it is 'hidden'. The payload is a boolean.
|
|
4714
|
-
*/
|
|
4715
|
-
this.clickOutside = new EventEmitter();
|
|
4716
|
-
}
|
|
4717
|
-
/**
|
|
4718
|
-
* Method called by Angular itself every click thanks to `@HostListener`.
|
|
4719
|
-
* @param event MouseEvent
|
|
4720
|
-
*/
|
|
4721
|
-
onClick(event) {
|
|
4722
|
-
event.stopPropagation();
|
|
4723
|
-
// tslint:disable-next-line:no-any
|
|
4724
|
-
const target = event.target;
|
|
4725
|
-
if (!this.clickOutsideEnable || !target) {
|
|
4726
|
-
return;
|
|
4727
|
-
}
|
|
4728
|
-
let isInside = false;
|
|
4729
|
-
let isHidden = false;
|
|
4730
|
-
if (typeof target.className !== 'string') {
|
|
4731
|
-
// it happens with @fortawesome/fontawesome 5
|
|
4732
|
-
// for some reason className is an object with 2 empty properties inside
|
|
4733
|
-
isInside = true;
|
|
4734
|
-
}
|
|
4735
|
-
else {
|
|
4736
|
-
// in normal scenarios, use classname, because it's a simple string
|
|
4737
|
-
isInside = target.className && target.className.includes('inside');
|
|
4738
|
-
isHidden = target.className.includes('hidden');
|
|
4739
|
-
}
|
|
4740
|
-
// if inside => don't close modal gallery
|
|
4741
|
-
// if hidden => close modal gallery
|
|
4742
|
-
/*
|
|
4743
|
-
i i' h | close
|
|
4744
|
-
0 1 0 | 1 => close modal gallery
|
|
4745
|
-
0 1 1 | 1 => close modal gallery
|
|
4746
|
-
1 0 0 | 0
|
|
4747
|
-
1 0 1 | 1 => close modal gallery
|
|
4748
|
-
*/
|
|
4749
|
-
if (!isInside || isHidden) {
|
|
4750
|
-
// close modal gallery
|
|
4751
|
-
this.clickOutside.emit(true);
|
|
4752
|
-
}
|
|
4753
|
-
}
|
|
4754
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: ClickOutsideDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
4755
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.1.7", type: ClickOutsideDirective, isStandalone: true, selector: "[ksClickOutside]", inputs: { clickOutsideEnable: "clickOutsideEnable" }, outputs: { clickOutside: "clickOutside" }, host: { listeners: { "click": "onClick($event)" } }, ngImport: i0 }); }
|
|
4756
|
-
}
|
|
4757
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: ClickOutsideDirective, decorators: [{
|
|
4758
|
-
type: Directive,
|
|
4759
|
-
args: [{ selector: '[ksClickOutside]' }]
|
|
4760
|
-
}], propDecorators: { clickOutsideEnable: [{
|
|
4761
|
-
type: Input
|
|
4762
|
-
}], clickOutside: [{
|
|
4763
|
-
type: Output
|
|
4764
|
-
}], onClick: [{
|
|
4765
|
-
type: HostListener,
|
|
4766
|
-
args: ['click', ['$event']]
|
|
4767
|
-
}] } });
|
|
4768
|
-
|
|
4769
4464
|
/*
|
|
4770
4465
|
The MIT License (MIT)
|
|
4771
4466
|
|
|
@@ -4835,47 +4530,399 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImpor
|
|
|
4835
4530
|
args: [{ providedIn: 'root' }]
|
|
4836
4531
|
}] });
|
|
4837
4532
|
|
|
4838
|
-
|
|
4533
|
+
/*
|
|
4534
|
+
The MIT License (MIT)
|
|
4535
|
+
|
|
4536
|
+
Copyright (c) 2017-2025 Stefano Cappa (Ks89)
|
|
4537
|
+
|
|
4538
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
4539
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
4540
|
+
in the Software without restriction, including without limitation the rights
|
|
4541
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
4542
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
4543
|
+
furnished to do so, subject to the following conditions:
|
|
4544
|
+
|
|
4545
|
+
The above copyright notice and this permission notice shall be included in all
|
|
4546
|
+
copies or substantial portions of the Software.
|
|
4547
|
+
|
|
4548
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
4549
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
4550
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL THE
|
|
4551
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
4552
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
4553
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
4554
|
+
SOFTWARE.
|
|
4555
|
+
*/
|
|
4556
|
+
/**
|
|
4557
|
+
* Class that represents the modal dialog instance.
|
|
4558
|
+
* It is returned by the open method.
|
|
4559
|
+
*/
|
|
4560
|
+
class ModalGalleryRef {
|
|
4561
|
+
constructor(overlayRef) {
|
|
4562
|
+
this.close = new Subject();
|
|
4563
|
+
this.close$ = this.close.asObservable();
|
|
4564
|
+
this.show = new Subject();
|
|
4565
|
+
this.show$ = this.show.asObservable();
|
|
4566
|
+
this.firstImage = new Subject();
|
|
4567
|
+
this.firstImage$ = this.firstImage.asObservable();
|
|
4568
|
+
this.lastImage = new Subject();
|
|
4569
|
+
this.lastImage$ = this.lastImage.asObservable();
|
|
4570
|
+
this.hasData = new Subject();
|
|
4571
|
+
this.hasData$ = this.hasData.asObservable();
|
|
4572
|
+
this.buttonBeforeHook = new Subject();
|
|
4573
|
+
this.buttonBeforeHook$ = this.buttonBeforeHook.asObservable();
|
|
4574
|
+
this.buttonAfterHook = new Subject();
|
|
4575
|
+
this.buttonAfterHook$ = this.buttonAfterHook.asObservable();
|
|
4576
|
+
this.overlayRef = overlayRef;
|
|
4577
|
+
}
|
|
4839
4578
|
/**
|
|
4840
|
-
*
|
|
4841
|
-
* This prevents unexpected behavior about scrolling.
|
|
4842
|
-
* Added to fix this issue: https://github.com/Ks89/angular-modal-gallery/issues/159
|
|
4579
|
+
* Close modal dialog, disposing the Overlay.
|
|
4843
4580
|
*/
|
|
4844
|
-
|
|
4845
|
-
this.
|
|
4581
|
+
closeModal() {
|
|
4582
|
+
this.overlayRef.dispose();
|
|
4846
4583
|
}
|
|
4847
4584
|
/**
|
|
4848
|
-
*
|
|
4849
|
-
*
|
|
4585
|
+
* Method to emit close event.
|
|
4586
|
+
* @param event ImageModalEvent event payload
|
|
4850
4587
|
*/
|
|
4851
|
-
|
|
4852
|
-
|
|
4853
|
-
this.downloadImage();
|
|
4588
|
+
emitClose(event) {
|
|
4589
|
+
this.close.next(event);
|
|
4854
4590
|
}
|
|
4855
|
-
|
|
4856
|
-
|
|
4857
|
-
|
|
4858
|
-
|
|
4859
|
-
|
|
4860
|
-
this.
|
|
4861
|
-
|
|
4862
|
-
|
|
4863
|
-
|
|
4864
|
-
|
|
4865
|
-
|
|
4866
|
-
|
|
4867
|
-
|
|
4868
|
-
|
|
4869
|
-
|
|
4870
|
-
|
|
4871
|
-
|
|
4872
|
-
|
|
4873
|
-
|
|
4874
|
-
this.
|
|
4875
|
-
|
|
4876
|
-
|
|
4591
|
+
/**
|
|
4592
|
+
* Method to emit show event.
|
|
4593
|
+
* @param event ImageModalEvent event payload
|
|
4594
|
+
*/
|
|
4595
|
+
emitShow(event) {
|
|
4596
|
+
this.show.next(event);
|
|
4597
|
+
}
|
|
4598
|
+
/**
|
|
4599
|
+
* Method to emit firstImage event.
|
|
4600
|
+
* @param event ImageModalEvent event payload
|
|
4601
|
+
*/
|
|
4602
|
+
emitFirstImage(event) {
|
|
4603
|
+
this.firstImage.next(event);
|
|
4604
|
+
}
|
|
4605
|
+
/**
|
|
4606
|
+
* Method to emit lastImage event.
|
|
4607
|
+
* @param event ImageModalEvent event payload
|
|
4608
|
+
*/
|
|
4609
|
+
emitLastImage(event) {
|
|
4610
|
+
this.lastImage.next(event);
|
|
4611
|
+
}
|
|
4612
|
+
/**
|
|
4613
|
+
* Method to emit hasData event.
|
|
4614
|
+
* @param event ImageModalEvent event payload
|
|
4615
|
+
*/
|
|
4616
|
+
emitHasData(event) {
|
|
4617
|
+
this.hasData.next(event);
|
|
4618
|
+
}
|
|
4619
|
+
/**
|
|
4620
|
+
* Method to emit buttonBeforeHook event.
|
|
4621
|
+
* @param event ImageModalEvent event payload
|
|
4622
|
+
*/
|
|
4623
|
+
emitButtonBeforeHook(event) {
|
|
4624
|
+
this.buttonBeforeHook.next(event);
|
|
4625
|
+
}
|
|
4626
|
+
/**
|
|
4627
|
+
* Method to emit buttonAfterHook event.
|
|
4628
|
+
* @param event ImageModalEvent event payload
|
|
4629
|
+
*/
|
|
4630
|
+
emitButtonAfterHook(event) {
|
|
4631
|
+
this.buttonAfterHook.next(event);
|
|
4632
|
+
}
|
|
4633
|
+
}
|
|
4634
|
+
|
|
4635
|
+
const DEFAULT_DIALOG_CONFIG = {
|
|
4636
|
+
hasBackdrop: true,
|
|
4637
|
+
backdropClass: 'ks-modal-gallery-backdrop',
|
|
4638
|
+
panelClass: 'ks-modal-gallery-panel'
|
|
4639
|
+
};
|
|
4640
|
+
class ModalGalleryService {
|
|
4641
|
+
constructor() {
|
|
4642
|
+
this.updateImages = new Subject();
|
|
4643
|
+
this.updateImages$ = this.updateImages.asObservable();
|
|
4644
|
+
this.triggerAttachToOverlay = new EventEmitter();
|
|
4645
|
+
this.overlay = inject(Overlay);
|
|
4646
|
+
this.configService = inject(ConfigService);
|
|
4647
|
+
}
|
|
4648
|
+
/**
|
|
4649
|
+
* Method to open modal gallery passing the configuration
|
|
4650
|
+
* @param config ModalGalleryConfig that contains: id, array of images, current image and optionally the configuration object
|
|
4651
|
+
* @return ModalGalleryRef | undefined is the object used to listen for events.
|
|
4652
|
+
*/
|
|
4653
|
+
open(config) {
|
|
4654
|
+
// Returns an OverlayRef which is a PortalHost
|
|
4655
|
+
const overlayRef = this.createOverlay();
|
|
4656
|
+
// Instantiate a reference to the dialog
|
|
4657
|
+
this.dialogRef = new ModalGalleryRef(overlayRef);
|
|
4658
|
+
// Attach dialog container
|
|
4659
|
+
this.triggerAttachToOverlay.emit({
|
|
4660
|
+
overlayRef,
|
|
4661
|
+
config,
|
|
4662
|
+
dialogRef: this.dialogRef
|
|
4663
|
+
});
|
|
4664
|
+
overlayRef.backdropClick().subscribe(() => {
|
|
4665
|
+
if (this.dialogRef) {
|
|
4666
|
+
this.dialogRef.closeModal();
|
|
4667
|
+
}
|
|
4668
|
+
});
|
|
4669
|
+
return this.dialogRef;
|
|
4670
|
+
}
|
|
4671
|
+
/**
|
|
4672
|
+
* Method to close a modal gallery previously opened.
|
|
4673
|
+
* @param id Unique identifier of the modal gallery
|
|
4674
|
+
* @param clickOutside boolean is true if closed clicking on the modal backdrop, false otherwise.
|
|
4675
|
+
*/
|
|
4676
|
+
close(id, clickOutside) {
|
|
4677
|
+
const libConfig = this.configService.getConfig(id);
|
|
4678
|
+
if (clickOutside) {
|
|
4679
|
+
if (this.dialogRef && libConfig && libConfig.enableCloseOutside) {
|
|
4680
|
+
this.dialogRef.closeModal();
|
|
4681
|
+
}
|
|
4682
|
+
}
|
|
4683
|
+
else {
|
|
4684
|
+
if (this.dialogRef) {
|
|
4685
|
+
this.dialogRef.closeModal();
|
|
4686
|
+
}
|
|
4687
|
+
}
|
|
4688
|
+
}
|
|
4689
|
+
/**
|
|
4690
|
+
* Method to update images array.
|
|
4691
|
+
* @param images Image[] updated array of images
|
|
4692
|
+
*/
|
|
4693
|
+
updateModalImages(images) {
|
|
4694
|
+
this.updateImages.next(images);
|
|
4695
|
+
}
|
|
4696
|
+
/**
|
|
4697
|
+
* Method to emit close event.
|
|
4698
|
+
* @param event ImageModalEvent is the event payload
|
|
4699
|
+
*/
|
|
4700
|
+
emitClose(event) {
|
|
4701
|
+
if (!this.dialogRef) {
|
|
4702
|
+
return;
|
|
4703
|
+
}
|
|
4704
|
+
this.dialogRef.emitClose(event);
|
|
4705
|
+
}
|
|
4706
|
+
/**
|
|
4707
|
+
* Method to emit show event.
|
|
4708
|
+
* @param event ImageModalEvent is the event payload
|
|
4709
|
+
*/
|
|
4710
|
+
emitShow(event) {
|
|
4711
|
+
if (!this.dialogRef) {
|
|
4712
|
+
return;
|
|
4713
|
+
}
|
|
4714
|
+
this.dialogRef.emitShow(event);
|
|
4715
|
+
}
|
|
4716
|
+
/**
|
|
4717
|
+
* Method to emit firstImage event.
|
|
4718
|
+
* @param event ImageModalEvent is the event payload
|
|
4719
|
+
*/
|
|
4720
|
+
emitFirstImage(event) {
|
|
4721
|
+
if (!this.dialogRef) {
|
|
4722
|
+
return;
|
|
4723
|
+
}
|
|
4724
|
+
this.dialogRef.emitFirstImage(event);
|
|
4725
|
+
}
|
|
4726
|
+
/**
|
|
4727
|
+
* Method to emit lastImage event.
|
|
4728
|
+
* @param event ImageModalEvent is the event payload
|
|
4729
|
+
*/
|
|
4730
|
+
emitLastImage(event) {
|
|
4731
|
+
if (!this.dialogRef) {
|
|
4732
|
+
return;
|
|
4733
|
+
}
|
|
4734
|
+
this.dialogRef.emitLastImage(event);
|
|
4735
|
+
}
|
|
4736
|
+
/**
|
|
4737
|
+
* Method to emit hasData event.
|
|
4738
|
+
* @param event ImageModalEvent is the event payload
|
|
4739
|
+
*/
|
|
4740
|
+
emitHasData(event) {
|
|
4741
|
+
if (!this.dialogRef) {
|
|
4742
|
+
return;
|
|
4743
|
+
}
|
|
4744
|
+
this.dialogRef.emitHasData(event);
|
|
4745
|
+
}
|
|
4746
|
+
/**
|
|
4747
|
+
* Method to emit buttonBeforeHook event.
|
|
4748
|
+
* @param event ButtonEvent is the event payload
|
|
4749
|
+
*/
|
|
4750
|
+
emitButtonBeforeHook(event) {
|
|
4751
|
+
if (!this.dialogRef) {
|
|
4752
|
+
return;
|
|
4753
|
+
}
|
|
4754
|
+
this.dialogRef.emitButtonBeforeHook(event);
|
|
4755
|
+
}
|
|
4756
|
+
/**
|
|
4757
|
+
* Method to emit buttonAfterHook event.
|
|
4758
|
+
* @param event ButtonEvent is the event payload
|
|
4759
|
+
*/
|
|
4760
|
+
emitButtonAfterHook(event) {
|
|
4761
|
+
if (!this.dialogRef) {
|
|
4762
|
+
return;
|
|
4763
|
+
}
|
|
4764
|
+
this.dialogRef.emitButtonAfterHook(event);
|
|
4765
|
+
}
|
|
4766
|
+
/**
|
|
4767
|
+
* Private method to create an Overlay using Angular CDK APIs
|
|
4768
|
+
* @private
|
|
4769
|
+
*/
|
|
4770
|
+
createOverlay() {
|
|
4771
|
+
const overlayConfig = this.getOverlayConfig();
|
|
4772
|
+
return this.overlay.create(overlayConfig);
|
|
4773
|
+
}
|
|
4774
|
+
/**
|
|
4775
|
+
* Private method to create an OverlayConfig instance
|
|
4776
|
+
* @private
|
|
4777
|
+
*/
|
|
4778
|
+
getOverlayConfig() {
|
|
4779
|
+
const positionStrategy = this.overlay.position().global().centerHorizontally().centerVertically();
|
|
4780
|
+
return new OverlayConfig({
|
|
4781
|
+
hasBackdrop: DEFAULT_DIALOG_CONFIG.hasBackdrop,
|
|
4782
|
+
backdropClass: DEFAULT_DIALOG_CONFIG.backdropClass,
|
|
4783
|
+
panelClass: DEFAULT_DIALOG_CONFIG.panelClass,
|
|
4784
|
+
scrollStrategy: this.overlay.scrollStrategies.block(),
|
|
4785
|
+
positionStrategy
|
|
4786
|
+
});
|
|
4787
|
+
}
|
|
4788
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: ModalGalleryService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4789
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: ModalGalleryService, providedIn: 'root' }); }
|
|
4790
|
+
}
|
|
4791
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: ModalGalleryService, decorators: [{
|
|
4792
|
+
type: Injectable,
|
|
4793
|
+
args: [{ providedIn: 'root' }]
|
|
4794
|
+
}] });
|
|
4795
|
+
|
|
4796
|
+
/*
|
|
4797
|
+
The MIT License (MIT)
|
|
4798
|
+
|
|
4799
|
+
Copyright (c) 2017-2025 Stefano Cappa (Ks89)
|
|
4800
|
+
|
|
4801
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
4802
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
4803
|
+
in the Software without restriction, including without limitation the rights
|
|
4804
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
4805
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
4806
|
+
furnished to do so, subject to the following conditions:
|
|
4807
|
+
|
|
4808
|
+
The above copyright notice and this permission notice shall be included in all
|
|
4809
|
+
copies or substantial portions of the Software.
|
|
4810
|
+
|
|
4811
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
4812
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
4813
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NON INFRINGEMENT. IN NO EVENT SHALL THE
|
|
4814
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
4815
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
4816
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
4817
|
+
SOFTWARE.
|
|
4818
|
+
*/
|
|
4819
|
+
/**
|
|
4820
|
+
* Directive to close the modal gallery clicking on the semi-transparent background.
|
|
4821
|
+
* In fact, it listens for a click on all elements that aren't 'inside' and it emits
|
|
4822
|
+
* an event using `@Output clickOutside`.
|
|
4823
|
+
*/
|
|
4824
|
+
class ClickOutsideDirective {
|
|
4825
|
+
constructor() {
|
|
4826
|
+
/**
|
|
4827
|
+
* Boolean to enable this directive.
|
|
4828
|
+
*/
|
|
4829
|
+
this.clickOutsideEnable = input(...(ngDevMode ? [undefined, { debugName: "clickOutsideEnable" }] : []));
|
|
4830
|
+
/**
|
|
4831
|
+
* Output to emit an event if the clicked element class doesn't contain 'inside' or it is 'hidden'. The payload is a boolean.
|
|
4832
|
+
*/
|
|
4833
|
+
this.clickOutside = output();
|
|
4834
|
+
}
|
|
4835
|
+
/**
|
|
4836
|
+
* Method called by Angular itself every click thanks to `@HostListener`.
|
|
4837
|
+
* @param event MouseEvent
|
|
4838
|
+
*/
|
|
4839
|
+
onClick(event) {
|
|
4840
|
+
event.stopPropagation();
|
|
4841
|
+
// tslint:disable-next-line:no-any
|
|
4842
|
+
const target = event.target;
|
|
4843
|
+
if (!this.clickOutsideEnable() || !target) {
|
|
4844
|
+
return;
|
|
4845
|
+
}
|
|
4846
|
+
let isInside = false;
|
|
4847
|
+
let isHidden = false;
|
|
4848
|
+
if (typeof target.className !== 'string') {
|
|
4849
|
+
// it happens with @fortawesome/fontawesome 5
|
|
4850
|
+
// for some reason className is an object with 2 empty properties inside
|
|
4851
|
+
isInside = true;
|
|
4852
|
+
}
|
|
4853
|
+
else {
|
|
4854
|
+
// in normal scenarios, use classname, because it's a simple string
|
|
4855
|
+
isInside = target.className && target.className.includes('inside');
|
|
4856
|
+
isHidden = target.className.includes('hidden');
|
|
4857
|
+
}
|
|
4858
|
+
// if inside => don't close modal gallery
|
|
4859
|
+
// if hidden => close modal gallery
|
|
4860
|
+
/*
|
|
4861
|
+
i i' h | close
|
|
4862
|
+
0 1 0 | 1 => close modal gallery
|
|
4863
|
+
0 1 1 | 1 => close modal gallery
|
|
4864
|
+
1 0 0 | 0
|
|
4865
|
+
1 0 1 | 1 => close modal gallery
|
|
4866
|
+
*/
|
|
4867
|
+
if (!isInside || isHidden) {
|
|
4868
|
+
// close modal gallery
|
|
4869
|
+
this.clickOutside.emit(true);
|
|
4870
|
+
}
|
|
4871
|
+
}
|
|
4872
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: ClickOutsideDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
4873
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.1.7", type: ClickOutsideDirective, isStandalone: true, selector: "[ksClickOutside]", inputs: { clickOutsideEnable: { classPropertyName: "clickOutsideEnable", publicName: "clickOutsideEnable", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { clickOutside: "clickOutside" }, host: { listeners: { "click": "onClick($event)" } }, ngImport: i0 }); }
|
|
4874
|
+
}
|
|
4875
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: ClickOutsideDirective, decorators: [{
|
|
4876
|
+
type: Directive,
|
|
4877
|
+
args: [{ selector: '[ksClickOutside]' }]
|
|
4878
|
+
}], propDecorators: { onClick: [{
|
|
4879
|
+
type: HostListener,
|
|
4880
|
+
args: ['click', ['$event']]
|
|
4881
|
+
}] } });
|
|
4882
|
+
|
|
4883
|
+
class ModalGalleryComponent {
|
|
4884
|
+
/**
|
|
4885
|
+
* HostListener to catch the browser back button and destroy the gallery.
|
|
4886
|
+
* This prevents unexpected behavior about scrolling.
|
|
4887
|
+
* Added to fix this issue: https://github.com/Ks89/angular-modal-gallery/issues/159
|
|
4888
|
+
*/
|
|
4889
|
+
onPopState() {
|
|
4890
|
+
this.closeGallery();
|
|
4891
|
+
}
|
|
4892
|
+
/**
|
|
4893
|
+
* HostListener to catch ctrl+s/meta+s and download the current image.
|
|
4894
|
+
* Inspired by https://netbasal.com/add-keyboard-shortcuts-to-your-angular-app-9bf2e89862b3
|
|
4895
|
+
*/
|
|
4896
|
+
onSaveListener(event) {
|
|
4897
|
+
event.preventDefault();
|
|
4898
|
+
this.downloadImage();
|
|
4899
|
+
}
|
|
4900
|
+
constructor() {
|
|
4901
|
+
/**
|
|
4902
|
+
* Reference to the CurrentImageComponent to invoke methods on it.
|
|
4903
|
+
*/
|
|
4904
|
+
this.currentImageComponent = viewChild(CurrentImageComponent, ...(ngDevMode ? [{ debugName: "currentImageComponent" }] : []));
|
|
4905
|
+
/**
|
|
4906
|
+
* Boolean to enable modal-gallery close behaviour when clicking
|
|
4907
|
+
* on the semi-transparent background. Enabled by default.
|
|
4908
|
+
*/
|
|
4909
|
+
this.enableCloseOutside = true;
|
|
4910
|
+
/**
|
|
4911
|
+
* Object of type `AccessibilityConfig` to init custom accessibility features.
|
|
4912
|
+
* For instance, it contains titles, alt texts, aria-labels and so on.
|
|
4913
|
+
*/
|
|
4914
|
+
this.accessibilityConfig = KS_DEFAULT_ACCESSIBILITY_CONFIG;
|
|
4915
|
+
/**
|
|
4916
|
+
* Boolean to open the modal gallery. False by default.
|
|
4877
4917
|
*/
|
|
4878
4918
|
this.showGallery = false;
|
|
4919
|
+
this.dialogContent = inject(DIALOG_DATA);
|
|
4920
|
+
this.platformId = inject(PLATFORM_ID);
|
|
4921
|
+
this.modalGalleryService = inject(ModalGalleryService);
|
|
4922
|
+
this.changeDetectorRef = inject(ChangeDetectorRef);
|
|
4923
|
+
this.idValidatorService = inject(IdValidatorService);
|
|
4924
|
+
this.sanitizer = inject(DomSanitizer);
|
|
4925
|
+
this.configService = inject(ConfigService);
|
|
4879
4926
|
this.id = this.dialogContent.id;
|
|
4880
4927
|
this.images = this.dialogContent.images;
|
|
4881
4928
|
this.currentImage = this.dialogContent.currentImage;
|
|
@@ -4913,6 +4960,7 @@ class ModalGalleryComponent {
|
|
|
4913
4960
|
throw new Error('Internal library error - libConfig and dotsConfig must be defined');
|
|
4914
4961
|
}
|
|
4915
4962
|
this.dotsConfig = libConfig.dotsConfig;
|
|
4963
|
+
this.buttonsConfig = libConfig.buttonsConfig;
|
|
4916
4964
|
setTimeout(() => {
|
|
4917
4965
|
this.initImages();
|
|
4918
4966
|
}, 0);
|
|
@@ -4982,16 +5030,17 @@ class ModalGalleryComponent {
|
|
|
4982
5030
|
if (this.images.length === 1) {
|
|
4983
5031
|
this.closeGallery();
|
|
4984
5032
|
}
|
|
4985
|
-
|
|
5033
|
+
const currentImageComponent = this.currentImageComponent();
|
|
5034
|
+
if (!currentImageComponent) {
|
|
4986
5035
|
throw new Error('currentImageComponent must be defined');
|
|
4987
5036
|
}
|
|
4988
|
-
const imageIndexToDelete =
|
|
5037
|
+
const imageIndexToDelete = currentImageComponent.getIndexToDelete(event.image);
|
|
4989
5038
|
if (imageIndexToDelete === this.images.length - 1) {
|
|
4990
5039
|
// last image
|
|
4991
|
-
|
|
5040
|
+
currentImageComponent.prevImage();
|
|
4992
5041
|
}
|
|
4993
5042
|
else {
|
|
4994
|
-
|
|
5043
|
+
currentImageComponent.nextImage();
|
|
4995
5044
|
}
|
|
4996
5045
|
this.modalGalleryService.emitButtonAfterHook(eventToEmit);
|
|
4997
5046
|
}
|
|
@@ -5290,22 +5339,13 @@ class ModalGalleryComponent {
|
|
|
5290
5339
|
break;
|
|
5291
5340
|
}
|
|
5292
5341
|
}
|
|
5293
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: ModalGalleryComponent, deps: [
|
|
5294
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
5342
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: ModalGalleryComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5343
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.1.7", type: ModalGalleryComponent, isStandalone: true, selector: "ks-modal-gallery", host: { listeners: { "window:popstate": "onPopState()", "document:keydown.code.control.keyS": "onSaveListener($event)", "document:keydown.code.meta.keyS": "onSaveListener($event)" } }, viewQueries: [{ propertyName: "currentImageComponent", first: true, predicate: CurrentImageComponent, descendants: true, isSignal: true }], ngImport: i0, template: "<div id=\"modal-gallery-wrapper\"\n [attr.aria-label]=\"accessibilityConfig.modalGalleryContentAriaLabel\"\n [title]=\"accessibilityConfig.modalGalleryContentTitle\"\n ksClickOutside [clickOutsideEnable]=\"enableCloseOutside\"\n (clickOutside)=\"onClickOutside($event)\">\n\n <div id=\"flex-min-height-ie-fix\">\n <div id=\"modal-gallery-container\">\n\n <ks-upper-buttons [id]=\"id\"\n [currentImage]=\"currentImage\"\n [buttonsConfig]=\"buttonsConfig\"\n (delete)=\"onDelete($event)\"\n (navigate)=\"onNavigate($event)\"\n (download)=\"onDownload($event)\"\n (closeButton)=\"onCloseGalleryButton($event)\"\n (fullscreen)=\"onFullScreen($event)\"\n (customEmit)=\"onCustomEmit($event)\" />\n\n <ks-current-image [id]=\"id\"\n [images]=\"images\"\n [currentImage]=\"currentImage\"\n [isOpen]=\"true\"\n (loadImage)=\"onImageLoad($event)\"\n (changeImage)=\"onChangeCurrentImage($event)\"\n (closeGallery)=\"onCloseGallery($event)\" />\n\n <div>\n <ks-dots [id]=\"id\"\n [images]=\"images\"\n [currentImage]=\"currentImage\"\n [dotsConfig]=\"dotsConfig\"\n [accessibilityConfig]=\"accessibilityConfig\"\n (clickDot)=\"onClickDot($event)\" />\n\n <ks-previews [id]=\"id\"\n [images]=\"images\"\n [currentImage]=\"currentImage\"\n [customTemplate]=\"customPreviewsTemplate\"\n (clickPreview)=\"onClickPreview($event)\" />\n </div>\n </div>\n </div>\n</div>\n", styles: ["#flex-min-height-ie-fix{display:flex;flex-direction:column;justify-content:center}#modal-gallery-container{display:flex;flex-direction:column;justify-content:space-between;min-width:100vw;min-height:100vh}\n"], dependencies: [{ kind: "directive", type: ClickOutsideDirective, selector: "[ksClickOutside]", inputs: ["clickOutsideEnable"], outputs: ["clickOutside"] }, { kind: "component", type: UpperButtonsComponent, selector: "ks-upper-buttons", inputs: ["id", "currentImage", "buttonsConfig"], outputs: ["refresh", "delete", "navigate", "download", "closeButton", "fullscreen", "customEmit"] }, { kind: "component", type: CurrentImageComponent, selector: "ks-current-image", inputs: ["id", "currentImage", "images", "isOpen"], outputs: ["loadImage", "changeImage", "closeGallery"] }, { kind: "component", type: DotsComponent, selector: "ks-dots", inputs: ["id", "currentImage", "images", "dotsConfig", "accessibilityConfig"], outputs: ["clickDot"] }, { kind: "component", type: PreviewsComponent, selector: "ks-previews", inputs: ["id", "currentImage", "images", "customTemplate"], outputs: ["clickPreview"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
5295
5344
|
}
|
|
5296
5345
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: ModalGalleryComponent, decorators: [{
|
|
5297
5346
|
type: Component,
|
|
5298
|
-
args: [{ selector: 'ks-modal-gallery', changeDetection: ChangeDetectionStrategy.OnPush, imports: [ClickOutsideDirective, UpperButtonsComponent, CurrentImageComponent, DotsComponent, PreviewsComponent], template: "<div id=\"modal-gallery-wrapper\"\n [attr.aria-label]=\"accessibilityConfig.modalGalleryContentAriaLabel\"\n [title]=\"accessibilityConfig.modalGalleryContentTitle\"\n ksClickOutside [clickOutsideEnable]=\"enableCloseOutside\"\n (clickOutside)=\"onClickOutside($event)\">\n\n <div id=\"flex-min-height-ie-fix\">\n <div id=\"modal-gallery-container\">\n\n <ks-upper-buttons [id]=\"id\"\n [currentImage]=\"currentImage\"\n (delete)=\"onDelete($event)\"\n (navigate)=\"onNavigate($event)\"\n (download)=\"onDownload($event)\"\n (closeButton)=\"onCloseGalleryButton($event)\"\n (fullscreen)=\"onFullScreen($event)\"\n (customEmit)=\"onCustomEmit($event)\"
|
|
5299
|
-
}], ctorParameters: () => [
|
|
5300
|
-
type: Inject,
|
|
5301
|
-
args: [DIALOG_DATA]
|
|
5302
|
-
}] }, { type: ModalGalleryService }, { type: Object, decorators: [{
|
|
5303
|
-
type: Inject,
|
|
5304
|
-
args: [PLATFORM_ID]
|
|
5305
|
-
}] }, { type: i0.ChangeDetectorRef }, { type: IdValidatorService }, { type: ConfigService }, { type: i2.DomSanitizer }], propDecorators: { currentImageComponent: [{
|
|
5306
|
-
type: ViewChild,
|
|
5307
|
-
args: [CurrentImageComponent, { static: true }]
|
|
5308
|
-
}], onPopState: [{
|
|
5347
|
+
args: [{ selector: 'ks-modal-gallery', changeDetection: ChangeDetectionStrategy.OnPush, imports: [ClickOutsideDirective, UpperButtonsComponent, CurrentImageComponent, DotsComponent, PreviewsComponent], template: "<div id=\"modal-gallery-wrapper\"\n [attr.aria-label]=\"accessibilityConfig.modalGalleryContentAriaLabel\"\n [title]=\"accessibilityConfig.modalGalleryContentTitle\"\n ksClickOutside [clickOutsideEnable]=\"enableCloseOutside\"\n (clickOutside)=\"onClickOutside($event)\">\n\n <div id=\"flex-min-height-ie-fix\">\n <div id=\"modal-gallery-container\">\n\n <ks-upper-buttons [id]=\"id\"\n [currentImage]=\"currentImage\"\n [buttonsConfig]=\"buttonsConfig\"\n (delete)=\"onDelete($event)\"\n (navigate)=\"onNavigate($event)\"\n (download)=\"onDownload($event)\"\n (closeButton)=\"onCloseGalleryButton($event)\"\n (fullscreen)=\"onFullScreen($event)\"\n (customEmit)=\"onCustomEmit($event)\" />\n\n <ks-current-image [id]=\"id\"\n [images]=\"images\"\n [currentImage]=\"currentImage\"\n [isOpen]=\"true\"\n (loadImage)=\"onImageLoad($event)\"\n (changeImage)=\"onChangeCurrentImage($event)\"\n (closeGallery)=\"onCloseGallery($event)\" />\n\n <div>\n <ks-dots [id]=\"id\"\n [images]=\"images\"\n [currentImage]=\"currentImage\"\n [dotsConfig]=\"dotsConfig\"\n [accessibilityConfig]=\"accessibilityConfig\"\n (clickDot)=\"onClickDot($event)\" />\n\n <ks-previews [id]=\"id\"\n [images]=\"images\"\n [currentImage]=\"currentImage\"\n [customTemplate]=\"customPreviewsTemplate\"\n (clickPreview)=\"onClickPreview($event)\" />\n </div>\n </div>\n </div>\n</div>\n", styles: ["#flex-min-height-ie-fix{display:flex;flex-direction:column;justify-content:center}#modal-gallery-container{display:flex;flex-direction:column;justify-content:space-between;min-width:100vw;min-height:100vh}\n"] }]
|
|
5348
|
+
}], ctorParameters: () => [], propDecorators: { onPopState: [{
|
|
5309
5349
|
type: HostListener,
|
|
5310
5350
|
args: ['window:popstate']
|
|
5311
5351
|
}], onSaveListener: [{
|
|
@@ -5382,9 +5422,25 @@ const COMPONENTS = [
|
|
|
5382
5422
|
* Directive to change margins of an element.
|
|
5383
5423
|
*/
|
|
5384
5424
|
class MarginDirective {
|
|
5385
|
-
constructor(
|
|
5386
|
-
|
|
5387
|
-
|
|
5425
|
+
constructor() {
|
|
5426
|
+
/**
|
|
5427
|
+
* String to set the margin of an element.
|
|
5428
|
+
*/
|
|
5429
|
+
this.marginLeft = input(...(ngDevMode ? [undefined, { debugName: "marginLeft" }] : []));
|
|
5430
|
+
/**
|
|
5431
|
+
* String to set the margin of an element.
|
|
5432
|
+
*/
|
|
5433
|
+
this.marginRight = input(...(ngDevMode ? [undefined, { debugName: "marginRight" }] : []));
|
|
5434
|
+
/**
|
|
5435
|
+
* String to set the margin of an element.
|
|
5436
|
+
*/
|
|
5437
|
+
this.marginTop = input(...(ngDevMode ? [undefined, { debugName: "marginTop" }] : []));
|
|
5438
|
+
/**
|
|
5439
|
+
* String to set the margin of an element.
|
|
5440
|
+
*/
|
|
5441
|
+
this.marginBottom = input(...(ngDevMode ? [undefined, { debugName: "marginBottom" }] : []));
|
|
5442
|
+
this.renderer = inject(Renderer2);
|
|
5443
|
+
this.el = inject(ElementRef);
|
|
5388
5444
|
}
|
|
5389
5445
|
/**
|
|
5390
5446
|
* Method ´ngOnInit´ to apply the style of this directive.
|
|
@@ -5406,34 +5462,30 @@ class MarginDirective {
|
|
|
5406
5462
|
* Private method to change both width and height of an element.
|
|
5407
5463
|
*/
|
|
5408
5464
|
applyStyle() {
|
|
5409
|
-
|
|
5410
|
-
|
|
5465
|
+
const marginLeft = this.marginLeft();
|
|
5466
|
+
if (marginLeft) {
|
|
5467
|
+
this.renderer.setStyle(this.el.nativeElement, 'margin-left', marginLeft);
|
|
5411
5468
|
}
|
|
5412
|
-
|
|
5413
|
-
|
|
5469
|
+
const marginRight = this.marginRight();
|
|
5470
|
+
if (marginRight) {
|
|
5471
|
+
this.renderer.setStyle(this.el.nativeElement, 'margin-right', marginRight);
|
|
5414
5472
|
}
|
|
5415
|
-
|
|
5416
|
-
|
|
5473
|
+
const marginTop = this.marginTop();
|
|
5474
|
+
if (marginTop) {
|
|
5475
|
+
this.renderer.setStyle(this.el.nativeElement, 'margin-top', marginTop);
|
|
5417
5476
|
}
|
|
5418
|
-
|
|
5419
|
-
|
|
5477
|
+
const marginBottom = this.marginBottom();
|
|
5478
|
+
if (marginBottom) {
|
|
5479
|
+
this.renderer.setStyle(this.el.nativeElement, 'margin-bottom', marginBottom);
|
|
5420
5480
|
}
|
|
5421
5481
|
}
|
|
5422
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: MarginDirective, deps: [
|
|
5423
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
5482
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: MarginDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
5483
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.1.7", type: MarginDirective, isStandalone: true, selector: "[ksMargin]", inputs: { marginLeft: { classPropertyName: "marginLeft", publicName: "marginLeft", isSignal: true, isRequired: false, transformFunction: null }, marginRight: { classPropertyName: "marginRight", publicName: "marginRight", isSignal: true, isRequired: false, transformFunction: null }, marginTop: { classPropertyName: "marginTop", publicName: "marginTop", isSignal: true, isRequired: false, transformFunction: null }, marginBottom: { classPropertyName: "marginBottom", publicName: "marginBottom", isSignal: true, isRequired: false, transformFunction: null } }, usesOnChanges: true, ngImport: i0 }); }
|
|
5424
5484
|
}
|
|
5425
5485
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: MarginDirective, decorators: [{
|
|
5426
5486
|
type: Directive,
|
|
5427
5487
|
args: [{ selector: '[ksMargin]' }]
|
|
5428
|
-
}]
|
|
5429
|
-
type: Input
|
|
5430
|
-
}], marginRight: [{
|
|
5431
|
-
type: Input
|
|
5432
|
-
}], marginTop: [{
|
|
5433
|
-
type: Input
|
|
5434
|
-
}], marginBottom: [{
|
|
5435
|
-
type: Input
|
|
5436
|
-
}] } });
|
|
5488
|
+
}] });
|
|
5437
5489
|
|
|
5438
5490
|
/*
|
|
5439
5491
|
The MIT License (MIT)
|
|
@@ -5476,9 +5528,9 @@ const DIRECTIVES = [
|
|
|
5476
5528
|
];
|
|
5477
5529
|
|
|
5478
5530
|
class AttachToOverlayService {
|
|
5479
|
-
constructor(
|
|
5480
|
-
this.injector =
|
|
5481
|
-
this.modalGalleryService =
|
|
5531
|
+
constructor() {
|
|
5532
|
+
this.injector = inject(Injector);
|
|
5533
|
+
this.modalGalleryService = inject(ModalGalleryService);
|
|
5482
5534
|
}
|
|
5483
5535
|
/**
|
|
5484
5536
|
* To be called by a provider with the APP_INITIALIZER token.
|
|
@@ -5502,13 +5554,13 @@ class AttachToOverlayService {
|
|
|
5502
5554
|
const containerPortal = new ComponentPortal(ModalGalleryComponent, null, injector);
|
|
5503
5555
|
payload.overlayRef.attach(containerPortal);
|
|
5504
5556
|
}
|
|
5505
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: AttachToOverlayService, deps: [
|
|
5557
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: AttachToOverlayService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
5506
5558
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: AttachToOverlayService, providedIn: 'root' }); }
|
|
5507
5559
|
}
|
|
5508
5560
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: AttachToOverlayService, decorators: [{
|
|
5509
5561
|
type: Injectable,
|
|
5510
5562
|
args: [{ providedIn: 'root' }]
|
|
5511
|
-
}]
|
|
5563
|
+
}] });
|
|
5512
5564
|
|
|
5513
5565
|
/*
|
|
5514
5566
|
The MIT License (MIT)
|