@mintplayer/ng-swiper 21.0.0 → 21.1.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/fesm2022/mintplayer-ng-swiper-observe-size.mjs +13 -23
- package/fesm2022/mintplayer-ng-swiper-observe-size.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-swiper-swiper.mjs +259 -250
- package/fesm2022/mintplayer-ng-swiper-swiper.mjs.map +1 -1
- package/package.json +1 -1
- package/types/mintplayer-ng-swiper-observe-size.d.ts +8 -9
- package/types/mintplayer-ng-swiper-swiper.d.ts +54 -56
|
@@ -1,33 +1,26 @@
|
|
|
1
1
|
import { isPlatformServer } from '@angular/common';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { PLATFORM_ID,
|
|
4
|
-
import { map, BehaviorSubject } from 'rxjs';
|
|
3
|
+
import { inject, ElementRef, PLATFORM_ID, NgZone, signal, computed, Directive } from '@angular/core';
|
|
5
4
|
|
|
6
5
|
class BsObserveSizeDirective {
|
|
7
|
-
element;
|
|
8
|
-
platformId;
|
|
9
|
-
zone;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
this.platformId = platformId;
|
|
13
|
-
this.zone = zone;
|
|
6
|
+
element = inject(ElementRef);
|
|
7
|
+
platformId = inject(PLATFORM_ID);
|
|
8
|
+
zone = inject(NgZone);
|
|
9
|
+
observer;
|
|
10
|
+
constructor() {
|
|
14
11
|
if (!isPlatformServer(this.platformId) && typeof ResizeObserver !== 'undefined') {
|
|
15
12
|
this.observer = new ResizeObserver((entries) => {
|
|
16
|
-
|
|
17
|
-
this.zone.run(() => this.size$.next(entries[0].contentRect));
|
|
13
|
+
this.zone.run(() => this.size.set(entries[0].contentRect));
|
|
18
14
|
});
|
|
19
15
|
}
|
|
20
|
-
this.width$ = this.size$.pipe(map(size => size?.width));
|
|
21
|
-
this.height$ = this.size$.pipe(map(size => size?.height));
|
|
22
16
|
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
height$;
|
|
17
|
+
size = signal(undefined, ...(ngDevMode ? [{ debugName: "size" }] : []));
|
|
18
|
+
width = computed(() => this.size()?.width, ...(ngDevMode ? [{ debugName: "width" }] : []));
|
|
19
|
+
height = computed(() => this.size()?.height, ...(ngDevMode ? [{ debugName: "height" }] : []));
|
|
27
20
|
ngAfterViewInit() {
|
|
28
21
|
const el = this.element.nativeElement;
|
|
29
22
|
this.observer?.observe(el);
|
|
30
|
-
this.size
|
|
23
|
+
this.size.set({ width: el.clientWidth, height: el.clientHeight });
|
|
31
24
|
}
|
|
32
25
|
ngOnDestroy() {
|
|
33
26
|
if (this.observer) {
|
|
@@ -35,7 +28,7 @@ class BsObserveSizeDirective {
|
|
|
35
28
|
this.observer.disconnect();
|
|
36
29
|
}
|
|
37
30
|
}
|
|
38
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsObserveSizeDirective, deps: [
|
|
31
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsObserveSizeDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
39
32
|
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.0.6", type: BsObserveSizeDirective, isStandalone: true, selector: "[bsObserveSize]", exportAs: ["bsObserveSize"], ngImport: i0 });
|
|
40
33
|
}
|
|
41
34
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsObserveSizeDirective, decorators: [{
|
|
@@ -45,10 +38,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
45
38
|
standalone: true,
|
|
46
39
|
exportAs: 'bsObserveSize'
|
|
47
40
|
}]
|
|
48
|
-
}], ctorParameters: () => [
|
|
49
|
-
type: Inject,
|
|
50
|
-
args: [PLATFORM_ID]
|
|
51
|
-
}] }, { type: i0.NgZone }] });
|
|
41
|
+
}], ctorParameters: () => [] });
|
|
52
42
|
|
|
53
43
|
/**
|
|
54
44
|
* Generated bundle index. Do not edit.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mintplayer-ng-swiper-observe-size.mjs","sources":["../../../../libs/mintplayer-ng-swiper/observe-size/src/observe-size.directive.ts","../../../../libs/mintplayer-ng-swiper/observe-size/mintplayer-ng-swiper-observe-size.ts"],"sourcesContent":["import { isPlatformServer } from '@angular/common';\r\nimport { AfterViewInit, Directive, ElementRef,
|
|
1
|
+
{"version":3,"file":"mintplayer-ng-swiper-observe-size.mjs","sources":["../../../../libs/mintplayer-ng-swiper/observe-size/src/observe-size.directive.ts","../../../../libs/mintplayer-ng-swiper/observe-size/mintplayer-ng-swiper-observe-size.ts"],"sourcesContent":["import { isPlatformServer } from '@angular/common';\r\nimport { AfterViewInit, computed, Directive, ElementRef, inject, NgZone, OnDestroy, PLATFORM_ID, signal } from '@angular/core';\r\nimport { Size } from './size';\r\n\r\n@Directive({\r\n selector: '[bsObserveSize]',\r\n standalone: true,\r\n exportAs: 'bsObserveSize'\r\n})\r\nexport class BsObserveSizeDirective implements AfterViewInit, OnDestroy {\r\n private element = inject(ElementRef);\r\n private platformId = inject(PLATFORM_ID);\r\n private zone = inject(NgZone);\r\n\r\n private observer?: ResizeObserver;\r\n\r\n constructor() {\r\n if (!isPlatformServer(this.platformId) && typeof ResizeObserver !== 'undefined') {\r\n this.observer = new ResizeObserver((entries) => {\r\n this.zone.run(() => this.size.set(entries[0].contentRect));\r\n });\r\n }\r\n }\r\n\r\n size = signal<Size | undefined>(undefined);\r\n width = computed(() => this.size()?.width);\r\n height = computed(() => this.size()?.height);\r\n\r\n ngAfterViewInit() {\r\n const el: HTMLElement = this.element.nativeElement;\r\n this.observer?.observe(el);\r\n this.size.set({ width: el.clientWidth, height: el.clientHeight });\r\n }\r\n\r\n ngOnDestroy() {\r\n if (this.observer) {\r\n this.observer.unobserve(this.element.nativeElement);\r\n this.observer.disconnect();\r\n }\r\n }\r\n}","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MASa,sBAAsB,CAAA;AACzB,IAAA,OAAO,GAAG,MAAM,CAAC,UAAU,CAAC;AAC5B,IAAA,UAAU,GAAG,MAAM,CAAC,WAAW,CAAC;AAChC,IAAA,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC;AAErB,IAAA,QAAQ;AAEhB,IAAA,WAAA,GAAA;AACE,QAAA,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,OAAO,cAAc,KAAK,WAAW,EAAE;YAC/E,IAAI,CAAC,QAAQ,GAAG,IAAI,cAAc,CAAC,CAAC,OAAO,KAAI;gBAC7C,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC;AAC5D,YAAA,CAAC,CAAC;QACJ;IACF;AAEA,IAAA,IAAI,GAAG,MAAM,CAAmB,SAAS,gDAAC;AAC1C,IAAA,KAAK,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,KAAK,iDAAC;AAC1C,IAAA,MAAM,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,MAAM,kDAAC;IAE5C,eAAe,GAAA;AACb,QAAA,MAAM,EAAE,GAAgB,IAAI,CAAC,OAAO,CAAC,aAAa;AAClD,QAAA,IAAI,CAAC,QAAQ,EAAE,OAAO,CAAC,EAAE,CAAC;AAC1B,QAAA,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,EAAE,CAAC,YAAY,EAAE,CAAC;IACnE;IAEA,WAAW,GAAA;AACT,QAAA,IAAI,IAAI,CAAC,QAAQ,EAAE;YACjB,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC;AACnD,YAAA,IAAI,CAAC,QAAQ,CAAC,UAAU,EAAE;QAC5B;IACF;uGA9BW,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAtB,sBAAsB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,iBAAA,EAAA,QAAA,EAAA,CAAA,eAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAtB,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBALlC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,iBAAiB;AAC3B,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE;AACX,iBAAA;;;ACRD;;AAEG;;;;"}
|
|
@@ -1,212 +1,231 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import {
|
|
3
|
-
import * as
|
|
2
|
+
import { inject, ElementRef, input, model, output, signal, computed, effect, forwardRef, ContentChildren, HostBinding, Directive, HostListener, NgModule } from '@angular/core';
|
|
3
|
+
import * as i1 from '@mintplayer/ng-swiper/observe-size';
|
|
4
4
|
import { BsObserveSizeDirective } from '@mintplayer/ng-swiper/observe-size';
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { DOCUMENT, CommonModule } from '@angular/common';
|
|
8
|
-
import * as i1 from '@angular/animations';
|
|
9
|
-
import { style, animate } from '@angular/animations';
|
|
5
|
+
import { DOCUMENT } from '@angular/common';
|
|
6
|
+
import { AnimationBuilder, style, animate } from '@angular/animations';
|
|
10
7
|
|
|
11
8
|
class BsSwipeContainerDirective {
|
|
12
|
-
animationBuilder;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
this.
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
9
|
+
animationBuilder = inject(AnimationBuilder);
|
|
10
|
+
observeSize = inject(BsObserveSizeDirective);
|
|
11
|
+
containerElement = inject((ElementRef));
|
|
12
|
+
document = inject(DOCUMENT);
|
|
13
|
+
offsetLeft = null;
|
|
14
|
+
offsetRight = null;
|
|
15
|
+
offsetTopPx = null;
|
|
16
|
+
offsetBottomPx = null;
|
|
17
|
+
set swipes(value) {
|
|
18
|
+
setTimeout(() => this._swipes.set(value));
|
|
19
|
+
}
|
|
20
|
+
minimumOffset = input(50, ...(ngDevMode ? [{ debugName: "minimumOffset" }] : []));
|
|
21
|
+
animation = input('slide', ...(ngDevMode ? [{ debugName: "animation" }] : []));
|
|
22
|
+
orientation = input('horizontal', ...(ngDevMode ? [{ debugName: "orientation" }] : []));
|
|
23
|
+
imageIndex = model(0, ...(ngDevMode ? [{ debugName: "imageIndex" }] : []));
|
|
24
|
+
animationStart = output();
|
|
25
|
+
animationEnd = output();
|
|
26
|
+
isViewInited = signal(false, ...(ngDevMode ? [{ debugName: "isViewInited" }] : []));
|
|
27
|
+
isAnimating = signal(false, ...(ngDevMode ? [{ debugName: "isAnimating" }] : []));
|
|
28
|
+
isDestroyed = false;
|
|
29
|
+
startTouch = signal(null, ...(ngDevMode ? [{ debugName: "startTouch" }] : []));
|
|
30
|
+
lastTouch = signal(null, ...(ngDevMode ? [{ debugName: "lastTouch" }] : []));
|
|
31
|
+
_swipes = signal(null, ...(ngDevMode ? [{ debugName: "_swipes" }] : []));
|
|
32
|
+
pendingAnimation;
|
|
33
|
+
// Computed signals for derived state
|
|
34
|
+
offset = computed(() => {
|
|
35
|
+
const startTouch = this.startTouch();
|
|
36
|
+
const lastTouch = this.lastTouch();
|
|
37
|
+
const imageIndex = this.imageIndex();
|
|
38
|
+
const isViewInited = this.isViewInited();
|
|
39
|
+
const orientation = this.orientation();
|
|
40
|
+
const containerSize = this.observeSize.size();
|
|
41
|
+
const maxSlideHeight = this.maxSlideHeight();
|
|
42
|
+
if (!isViewInited) {
|
|
43
|
+
return (-imageIndex * 100);
|
|
44
|
+
}
|
|
45
|
+
else if (!!startTouch && !!lastTouch) {
|
|
46
|
+
// For horizontal: use container width
|
|
47
|
+
// For vertical: use maxSlideHeight (single slide height, not total container height)
|
|
48
|
+
const containerLength = orientation === 'horizontal'
|
|
49
|
+
? (containerSize?.width ?? this.containerElement.nativeElement.clientWidth)
|
|
50
|
+
: maxSlideHeight;
|
|
51
|
+
if (containerLength === 0) {
|
|
31
52
|
return (-imageIndex * 100);
|
|
32
53
|
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
54
|
+
const delta = orientation === 'horizontal'
|
|
55
|
+
? (lastTouch.position.x - startTouch.position.x)
|
|
56
|
+
: (lastTouch.position.y - startTouch.position.y);
|
|
57
|
+
return (-imageIndex * 100 + (delta / containerLength) * 100);
|
|
58
|
+
}
|
|
59
|
+
else {
|
|
60
|
+
return (-imageIndex * 100);
|
|
61
|
+
}
|
|
62
|
+
}, ...(ngDevMode ? [{ debugName: "offset" }] : []));
|
|
63
|
+
padLeft = computed(() => {
|
|
64
|
+
const swipes = this._swipes();
|
|
65
|
+
if (!swipes)
|
|
66
|
+
return 0;
|
|
67
|
+
let count = 0;
|
|
68
|
+
for (const s of swipes) {
|
|
69
|
+
if (!s.offside()) {
|
|
70
|
+
break;
|
|
44
71
|
}
|
|
45
72
|
else {
|
|
46
|
-
|
|
73
|
+
count++;
|
|
47
74
|
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
count++;
|
|
60
|
-
}
|
|
75
|
+
}
|
|
76
|
+
return count;
|
|
77
|
+
}, ...(ngDevMode ? [{ debugName: "padLeft" }] : []));
|
|
78
|
+
padRight = computed(() => {
|
|
79
|
+
const swipes = this._swipes();
|
|
80
|
+
if (!swipes)
|
|
81
|
+
return 0;
|
|
82
|
+
let count = 0;
|
|
83
|
+
for (const s of swipes.toArray().reverse()) {
|
|
84
|
+
if (!s.offside()) {
|
|
85
|
+
break;
|
|
61
86
|
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
this.padRight$ = this.swipes$.pipe(map(swipes => {
|
|
65
|
-
if (!swipes) {
|
|
66
|
-
return 0;
|
|
87
|
+
else {
|
|
88
|
+
count++;
|
|
67
89
|
}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
90
|
+
}
|
|
91
|
+
return count;
|
|
92
|
+
}, ...(ngDevMode ? [{ debugName: "padRight" }] : []));
|
|
93
|
+
offsetPrimary = computed(() => this.offset() - this.padLeft() * 100, ...(ngDevMode ? [{ debugName: "offsetPrimary" }] : []));
|
|
94
|
+
offsetSecondary = computed(() => -(this.offset() - this.padLeft() * 100) - (this.padRight() - 1) * 100, ...(ngDevMode ? [{ debugName: "offsetSecondary" }] : []));
|
|
95
|
+
actualSwipes = computed(() => {
|
|
96
|
+
const swipes = this._swipes();
|
|
97
|
+
if (swipes) {
|
|
98
|
+
return swipes.filter(swipe => !swipe.offside());
|
|
99
|
+
}
|
|
100
|
+
else {
|
|
101
|
+
return [];
|
|
102
|
+
}
|
|
103
|
+
}, ...(ngDevMode ? [{ debugName: "actualSwipes" }] : []));
|
|
104
|
+
// Computed signal that reactively tracks all swipe sizes
|
|
105
|
+
slideSizes = computed(() => {
|
|
106
|
+
const actualSwipes = this.actualSwipes();
|
|
107
|
+
if (!actualSwipes || actualSwipes.length === 0) {
|
|
108
|
+
return [];
|
|
109
|
+
}
|
|
110
|
+
// Reading each swipe's size() creates reactive dependencies
|
|
111
|
+
return actualSwipes.map(swipe => swipe.observeSize.size());
|
|
112
|
+
}, ...(ngDevMode ? [{ debugName: "slideSizes" }] : []));
|
|
113
|
+
maxSlideHeight = computed(() => {
|
|
114
|
+
const slideSizes = this.slideSizes();
|
|
115
|
+
const heights = slideSizes.map(s => s?.height ?? 1);
|
|
116
|
+
return heights.length ? Math.max(...heights) : 1;
|
|
117
|
+
}, ...(ngDevMode ? [{ debugName: "maxSlideHeight" }] : []));
|
|
118
|
+
currentSlideHeight = computed(() => {
|
|
119
|
+
const slideSizes = this.slideSizes();
|
|
120
|
+
const imageIndex = this.imageIndex();
|
|
121
|
+
const orientation = this.orientation();
|
|
122
|
+
const heights = slideSizes.map(s => s?.height ?? 0);
|
|
123
|
+
const maxHeight = heights.length ? Math.max(...heights) : 0;
|
|
124
|
+
const currHeight = slideSizes[imageIndex]?.height ?? maxHeight;
|
|
125
|
+
const result = (orientation === 'vertical') ? maxHeight : currHeight;
|
|
126
|
+
// Return null if measurements aren't valid yet to avoid collapsing the carousel
|
|
127
|
+
return result > 10 ? result : null;
|
|
128
|
+
}, ...(ngDevMode ? [{ debugName: "currentSlideHeight" }] : []));
|
|
129
|
+
constructor() {
|
|
130
|
+
// Effect to update offsetLeft/offsetTopPx based on offsetPrimary and orientation
|
|
131
|
+
effect(() => {
|
|
132
|
+
const offsetPrimary = this.offsetPrimary();
|
|
133
|
+
const orientation = this.orientation();
|
|
134
|
+
const maxSlideHeight = this.maxSlideHeight();
|
|
135
|
+
const isAnimating = this.isAnimating();
|
|
136
|
+
// Skip updating offsets during animation to avoid interfering with CSS animation
|
|
137
|
+
if (isAnimating) {
|
|
138
|
+
return;
|
|
76
139
|
}
|
|
77
|
-
return count;
|
|
78
|
-
}));
|
|
79
|
-
this.offsetPrimary$ = combineLatest([this.offset$, this.padLeft$])
|
|
80
|
-
.pipe(map(([offset, padLeft]) => offset - padLeft * 100));
|
|
81
|
-
this.offsetSecondary$ = combineLatest([this.offset$, this.padLeft$, this.padRight$])
|
|
82
|
-
.pipe(map(([offset, padLeft, padRight]) => -(offset - padLeft * 100) - (padRight - 1) * 100));
|
|
83
|
-
combineLatest([this.offsetPrimary$, this.orientation$])
|
|
84
|
-
.pipe(takeUntilDestroyed())
|
|
85
|
-
.subscribe(([offsetPrimary, orientation]) => {
|
|
86
140
|
if (orientation === 'horizontal') {
|
|
87
141
|
this.offsetLeft = offsetPrimary;
|
|
88
|
-
this.
|
|
142
|
+
this.offsetTopPx = null;
|
|
89
143
|
}
|
|
90
144
|
else {
|
|
91
|
-
|
|
145
|
+
// For vertical mode, convert percentage to pixels using slide height
|
|
146
|
+
// offsetPrimary is in percentage units (e.g., -100 means -100%)
|
|
147
|
+
// We need to convert to pixels based on actual slide height
|
|
148
|
+
this.offsetTopPx = (offsetPrimary / 100) * maxSlideHeight;
|
|
92
149
|
this.offsetLeft = null;
|
|
93
150
|
}
|
|
94
151
|
});
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
.
|
|
152
|
+
// Effect to update offsetRight/offsetBottomPx based on offsetSecondary and orientation
|
|
153
|
+
effect(() => {
|
|
154
|
+
const offsetSecondary = this.offsetSecondary();
|
|
155
|
+
const orientation = this.orientation();
|
|
156
|
+
const maxSlideHeight = this.maxSlideHeight();
|
|
157
|
+
const isAnimating = this.isAnimating();
|
|
158
|
+
// Skip updating offsets during animation to avoid interfering with CSS animation
|
|
159
|
+
if (isAnimating) {
|
|
160
|
+
return;
|
|
161
|
+
}
|
|
98
162
|
if (orientation === 'horizontal') {
|
|
99
163
|
this.offsetRight = offsetSecondary;
|
|
100
|
-
this.
|
|
164
|
+
this.offsetBottomPx = null;
|
|
101
165
|
}
|
|
102
166
|
else {
|
|
103
|
-
|
|
167
|
+
// For vertical mode, convert percentage to pixels using slide height
|
|
168
|
+
this.offsetBottomPx = (offsetSecondary / 100) * maxSlideHeight;
|
|
104
169
|
this.offsetRight = null;
|
|
105
170
|
}
|
|
106
171
|
});
|
|
107
|
-
this.imageIndex$.pipe(takeUntilDestroyed())
|
|
108
|
-
.subscribe(imageIndex => this.imageIndexChange.emit(imageIndex));
|
|
109
|
-
this.actualSwipes$ = this.swipes$
|
|
110
|
-
.pipe(map(swipes => {
|
|
111
|
-
if (swipes) {
|
|
112
|
-
return swipes.filter(swipe => !swipe.offside());
|
|
113
|
-
}
|
|
114
|
-
else {
|
|
115
|
-
return [];
|
|
116
|
-
}
|
|
117
|
-
}));
|
|
118
|
-
this.slideSizes$ = this.actualSwipes$
|
|
119
|
-
.pipe(delay(400), filter(swipes => !!swipes))
|
|
120
|
-
.pipe(mergeMap(swipes => combineLatest(swipes.map(swipe => swipe.observeSize.size$))))
|
|
121
|
-
.pipe(shareReplay({ bufferSize: 1, refCount: true }));
|
|
122
|
-
this.maxSlideHeight$ = this.slideSizes$
|
|
123
|
-
.pipe(map(slideSizes => {
|
|
124
|
-
const heights = slideSizes.map(s => s?.height ?? 1);
|
|
125
|
-
return heights.length ? Math.max(...heights) : 1;
|
|
126
|
-
}))
|
|
127
|
-
.pipe(shareReplay({ bufferSize: 1, refCount: true }));
|
|
128
|
-
this.currentSlideHeight$ = combineLatest([this.slideSizes$, this.imageIndex$, this.orientation$])
|
|
129
|
-
.pipe(map(([slideSizes, imageIndex, orientation]) => {
|
|
130
|
-
const heights = slideSizes.map(s => s?.height ?? 1);
|
|
131
|
-
const maxHeight = heights.length ? Math.max(...heights) : 1;
|
|
132
|
-
const currHeight = slideSizes[imageIndex]?.height ?? maxHeight;
|
|
133
|
-
return (orientation === 'vertical') ? maxHeight : currHeight;
|
|
134
|
-
}))
|
|
135
|
-
.pipe(shareReplay({ bufferSize: 1, refCount: true }))
|
|
136
|
-
.pipe(debounceTime(10));
|
|
137
|
-
this.orientation$
|
|
138
|
-
.pipe(distinctUntilChanged(), takeUntilDestroyed())
|
|
139
|
-
.subscribe(() => {
|
|
140
|
-
this.offsetLeft = null;
|
|
141
|
-
this.offsetRight = null;
|
|
142
|
-
this.offsetTop = null;
|
|
143
|
-
this.offsetBottom = null;
|
|
144
|
-
});
|
|
145
|
-
}
|
|
146
|
-
offsetLeft = null;
|
|
147
|
-
offsetRight = null;
|
|
148
|
-
offsetTop = null;
|
|
149
|
-
offsetBottom = null;
|
|
150
|
-
set swipes(value) {
|
|
151
|
-
setTimeout(() => this.swipes$.next(value));
|
|
152
|
-
}
|
|
153
|
-
minimumOffset = 50;
|
|
154
|
-
get orientation() {
|
|
155
|
-
return this.orientation$.value;
|
|
156
|
-
}
|
|
157
|
-
set orientation(value) {
|
|
158
|
-
this.orientation$.next(value ?? 'horizontal');
|
|
159
172
|
}
|
|
160
|
-
//#region ImageIndex
|
|
161
|
-
get imageIndex() {
|
|
162
|
-
return this.imageIndex$.value;
|
|
163
|
-
}
|
|
164
|
-
set imageIndex(value) {
|
|
165
|
-
this.imageIndex$.next(value);
|
|
166
|
-
}
|
|
167
|
-
imageIndexChange = new EventEmitter();
|
|
168
|
-
//#endregion
|
|
169
|
-
actualSwipes$;
|
|
170
|
-
isViewInited$ = new BehaviorSubject(false);
|
|
171
|
-
startTouch$ = new BehaviorSubject(null);
|
|
172
|
-
lastTouch$ = new BehaviorSubject(null);
|
|
173
|
-
swipes$ = new BehaviorSubject(null);
|
|
174
|
-
// TODO: slide sizes instead
|
|
175
|
-
slideSizes$;
|
|
176
|
-
maxSlideHeight$;
|
|
177
|
-
imageIndex$ = new BehaviorSubject(0);
|
|
178
|
-
currentSlideHeight$;
|
|
179
|
-
pendingAnimation;
|
|
180
|
-
containerElement;
|
|
181
|
-
document;
|
|
182
|
-
// TODO: Don't just keep px, but both px and % using currentslidesize$
|
|
183
|
-
offset$;
|
|
184
|
-
offsetPrimary$;
|
|
185
|
-
offsetSecondary$;
|
|
186
|
-
padLeft$;
|
|
187
|
-
padRight$;
|
|
188
|
-
orientation$ = new BehaviorSubject('horizontal');
|
|
189
173
|
ngAfterViewInit() {
|
|
190
|
-
this.isViewInited
|
|
174
|
+
this.isViewInited.set(true);
|
|
175
|
+
}
|
|
176
|
+
ngOnDestroy() {
|
|
177
|
+
this.isDestroyed = true;
|
|
178
|
+
this.pendingAnimation?.destroy();
|
|
191
179
|
}
|
|
192
180
|
animateToIndexByDx(distance) {
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
this.animateToIndex(imageIndex, newIndex, distance, actualSwipes?.length ?? 1);
|
|
204
|
-
});
|
|
181
|
+
const imageIndex = this.imageIndex();
|
|
182
|
+
const actualSwipes = this.actualSwipes();
|
|
183
|
+
let newIndex;
|
|
184
|
+
if (Math.abs(distance) < this.minimumOffset()) {
|
|
185
|
+
newIndex = imageIndex;
|
|
186
|
+
}
|
|
187
|
+
else {
|
|
188
|
+
newIndex = imageIndex + (distance < 0 ? 1 : -1);
|
|
189
|
+
}
|
|
190
|
+
this.animateToIndex(imageIndex, newIndex, distance, actualSwipes?.length ?? 1);
|
|
205
191
|
}
|
|
206
192
|
animateToIndex(oldIndex, newIndex, distance, totalSlides) {
|
|
207
|
-
const
|
|
193
|
+
const animation = this.animation();
|
|
194
|
+
const orientation = this.orientation();
|
|
208
195
|
const containerElement = this.containerElement.nativeElement;
|
|
209
|
-
const
|
|
196
|
+
const maxSlideHeight = this.maxSlideHeight();
|
|
197
|
+
// For vertical mode, use maxSlideHeight instead of container height
|
|
198
|
+
const containerLength = orientation === 'horizontal'
|
|
199
|
+
? containerElement.clientWidth
|
|
200
|
+
: maxSlideHeight;
|
|
201
|
+
this.animationStart.emit();
|
|
202
|
+
// Handle 'none' animation mode - instant transition
|
|
203
|
+
if (animation === 'none') {
|
|
204
|
+
// Correct the image index immediately
|
|
205
|
+
if (newIndex === -1) {
|
|
206
|
+
this.imageIndex.set(totalSlides - 1);
|
|
207
|
+
}
|
|
208
|
+
else if (newIndex === totalSlides) {
|
|
209
|
+
this.imageIndex.set(0);
|
|
210
|
+
}
|
|
211
|
+
else {
|
|
212
|
+
this.imageIndex.set(newIndex);
|
|
213
|
+
}
|
|
214
|
+
this.startTouch.set(null);
|
|
215
|
+
this.lastTouch.set(null);
|
|
216
|
+
this.animationEnd.emit();
|
|
217
|
+
return;
|
|
218
|
+
}
|
|
219
|
+
// Set animating flag and clear host bindings so animation has full control
|
|
220
|
+
this.isAnimating.set(true);
|
|
221
|
+
if (orientation === 'horizontal') {
|
|
222
|
+
this.offsetLeft = null;
|
|
223
|
+
this.offsetRight = null;
|
|
224
|
+
}
|
|
225
|
+
else {
|
|
226
|
+
this.offsetTopPx = null;
|
|
227
|
+
this.offsetBottomPx = null;
|
|
228
|
+
}
|
|
210
229
|
if (orientation === 'horizontal') {
|
|
211
230
|
this.pendingAnimation = this.animationBuilder.build([
|
|
212
231
|
style({
|
|
@@ -232,20 +251,25 @@ class BsSwipeContainerDirective {
|
|
|
232
251
|
]).create(containerElement);
|
|
233
252
|
}
|
|
234
253
|
this.pendingAnimation.onDone(() => {
|
|
254
|
+
if (this.isDestroyed)
|
|
255
|
+
return;
|
|
235
256
|
// Correct the image index
|
|
236
257
|
if (newIndex === -1) {
|
|
237
|
-
this.imageIndex
|
|
258
|
+
this.imageIndex.set(totalSlides - 1);
|
|
238
259
|
}
|
|
239
260
|
else if (newIndex === totalSlides) {
|
|
240
|
-
this.imageIndex
|
|
261
|
+
this.imageIndex.set(0);
|
|
241
262
|
}
|
|
242
263
|
else {
|
|
243
|
-
this.imageIndex
|
|
264
|
+
this.imageIndex.set(newIndex);
|
|
244
265
|
}
|
|
245
|
-
this.startTouch
|
|
246
|
-
this.lastTouch
|
|
266
|
+
this.startTouch.set(null);
|
|
267
|
+
this.lastTouch.set(null);
|
|
247
268
|
this.pendingAnimation?.destroy();
|
|
248
269
|
this.pendingAnimation = undefined;
|
|
270
|
+
// Clear animating flag so effects can update offsets again
|
|
271
|
+
this.isAnimating.set(false);
|
|
272
|
+
this.animationEnd.emit();
|
|
249
273
|
});
|
|
250
274
|
this.pendingAnimation.play();
|
|
251
275
|
}
|
|
@@ -264,76 +288,60 @@ class BsSwipeContainerDirective {
|
|
|
264
288
|
gotoAnimate(index, type) {
|
|
265
289
|
this.pendingAnimation?.finish();
|
|
266
290
|
setTimeout(() => {
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
291
|
+
if (this.isDestroyed)
|
|
292
|
+
return;
|
|
293
|
+
this.pendingAnimation?.finish();
|
|
294
|
+
const actualSwipes = this.actualSwipes();
|
|
295
|
+
const imageIndex = this.imageIndex();
|
|
296
|
+
const idx = (type === 'relative') ? imageIndex + index : index;
|
|
297
|
+
this.animateToIndex(imageIndex, idx, 0, actualSwipes?.length ?? 1);
|
|
274
298
|
}, 20);
|
|
275
299
|
}
|
|
276
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsSwipeContainerDirective, deps: [
|
|
277
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
300
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsSwipeContainerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
301
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.6", type: BsSwipeContainerDirective, isStandalone: true, selector: "[bsSwipeContainer]", inputs: { minimumOffset: { classPropertyName: "minimumOffset", publicName: "minimumOffset", isSignal: true, isRequired: false, transformFunction: null }, animation: { classPropertyName: "animation", publicName: "animation", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, imageIndex: { classPropertyName: "imageIndex", publicName: "imageIndex", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { imageIndex: "imageIndexChange", animationStart: "animationStart", animationEnd: "animationEnd" }, host: { properties: { "style.margin-left.%": "this.offsetLeft", "style.margin-right.%": "this.offsetRight", "style.margin-top.px": "this.offsetTopPx", "style.margin-bottom.px": "this.offsetBottomPx" } }, queries: [{ propertyName: "swipes", predicate: i0.forwardRef(() => BsSwipeDirective) }], exportAs: ["bsSwipeContainer"], hostDirectives: [{ directive: i1.BsObserveSizeDirective }], ngImport: i0 });
|
|
278
302
|
}
|
|
279
303
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsSwipeContainerDirective, decorators: [{
|
|
280
304
|
type: Directive,
|
|
281
305
|
args: [{
|
|
282
306
|
selector: '[bsSwipeContainer]',
|
|
283
307
|
exportAs: 'bsSwipeContainer',
|
|
284
|
-
standalone:
|
|
308
|
+
standalone: true,
|
|
285
309
|
hostDirectives: [BsObserveSizeDirective],
|
|
286
310
|
}]
|
|
287
|
-
}], ctorParameters: () => [
|
|
288
|
-
type: Inject,
|
|
289
|
-
args: [DOCUMENT]
|
|
290
|
-
}] }, { type: i2.BsObserveSizeDirective }], propDecorators: { offsetLeft: [{
|
|
311
|
+
}], ctorParameters: () => [], propDecorators: { offsetLeft: [{
|
|
291
312
|
type: HostBinding,
|
|
292
313
|
args: ['style.margin-left.%']
|
|
293
314
|
}], offsetRight: [{
|
|
294
315
|
type: HostBinding,
|
|
295
316
|
args: ['style.margin-right.%']
|
|
296
|
-
}],
|
|
317
|
+
}], offsetTopPx: [{
|
|
297
318
|
type: HostBinding,
|
|
298
|
-
args: ['style.margin-top
|
|
299
|
-
}],
|
|
319
|
+
args: ['style.margin-top.px']
|
|
320
|
+
}], offsetBottomPx: [{
|
|
300
321
|
type: HostBinding,
|
|
301
|
-
args: ['style.margin-bottom
|
|
322
|
+
args: ['style.margin-bottom.px']
|
|
302
323
|
}], swipes: [{
|
|
303
324
|
type: ContentChildren,
|
|
304
325
|
args: [forwardRef(() => BsSwipeDirective)]
|
|
305
|
-
}], minimumOffset: [{
|
|
306
|
-
type: Input
|
|
307
|
-
}], orientation: [{
|
|
308
|
-
type: Input
|
|
309
|
-
}], imageIndex: [{
|
|
310
|
-
type: Input
|
|
311
|
-
}], imageIndexChange: [{
|
|
312
|
-
type: Output
|
|
313
|
-
}] } });
|
|
326
|
+
}], minimumOffset: [{ type: i0.Input, args: [{ isSignal: true, alias: "minimumOffset", required: false }] }], animation: [{ type: i0.Input, args: [{ isSignal: true, alias: "animation", required: false }] }], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], imageIndex: [{ type: i0.Input, args: [{ isSignal: true, alias: "imageIndex", required: false }] }, { type: i0.Output, args: ["imageIndexChange"] }], animationStart: [{ type: i0.Output, args: ["animationStart"] }], animationEnd: [{ type: i0.Output, args: ["animationEnd"] }] } });
|
|
314
327
|
|
|
315
328
|
class BsSwipeDirective {
|
|
316
|
-
container;
|
|
317
|
-
|
|
318
|
-
constructor(container, observeSize, destroy) {
|
|
319
|
-
this.container = container;
|
|
320
|
-
this.destroy = destroy;
|
|
321
|
-
this.observeSize = observeSize;
|
|
322
|
-
this.container.orientation$
|
|
323
|
-
.pipe(takeUntilDestroyed())
|
|
324
|
-
.subscribe(orientation => {
|
|
325
|
-
this.inlineBlock = (orientation === 'horizontal');
|
|
326
|
-
this.block = (orientation === 'vertical');
|
|
327
|
-
});
|
|
328
|
-
combineLatest([this.container.maxSlideHeight$, this.container.orientation$])
|
|
329
|
-
.pipe(takeUntilDestroyed())
|
|
330
|
-
.subscribe(([maxHeight, orientation]) => {
|
|
331
|
-
const targetHeight = (orientation === 'vertical') ? maxHeight : null;
|
|
332
|
-
this.slideHeight = (targetHeight && targetHeight > 0) ? targetHeight : null;
|
|
333
|
-
});
|
|
334
|
-
}
|
|
335
|
-
observeSize;
|
|
329
|
+
container = inject(BsSwipeContainerDirective);
|
|
330
|
+
observeSize = inject(BsObserveSizeDirective);
|
|
336
331
|
offside = input(false, ...(ngDevMode ? [{ debugName: "offside" }] : []));
|
|
332
|
+
orientationEffect = effect(() => {
|
|
333
|
+
const orientation = this.container.orientation();
|
|
334
|
+
this.inlineBlock = (orientation === 'horizontal');
|
|
335
|
+
this.block = (orientation === 'vertical');
|
|
336
|
+
}, ...(ngDevMode ? [{ debugName: "orientationEffect" }] : []));
|
|
337
|
+
heightEffect = effect(() => {
|
|
338
|
+
const maxHeight = this.container.maxSlideHeight();
|
|
339
|
+
const orientation = this.container.orientation();
|
|
340
|
+
// Only set height when we have valid measurements (> 10px threshold)
|
|
341
|
+
// to avoid circular dependency during initial load
|
|
342
|
+
const targetHeight = (orientation === 'vertical' && maxHeight > 10) ? maxHeight : null;
|
|
343
|
+
this.slideHeight = targetHeight;
|
|
344
|
+
}, ...(ngDevMode ? [{ debugName: "heightEffect" }] : []));
|
|
337
345
|
classes = true;
|
|
338
346
|
inlineBlock = true;
|
|
339
347
|
block = false;
|
|
@@ -341,16 +349,17 @@ class BsSwipeDirective {
|
|
|
341
349
|
onTouchStart(ev) {
|
|
342
350
|
if (ev.touches.length === 1) {
|
|
343
351
|
ev.preventDefault();
|
|
352
|
+
ev.stopPropagation();
|
|
344
353
|
this.container.pendingAnimation?.finish();
|
|
345
354
|
setTimeout(() => {
|
|
346
|
-
this.container.startTouch
|
|
355
|
+
this.container.startTouch.set({
|
|
347
356
|
position: {
|
|
348
357
|
x: ev.touches[0].clientX,
|
|
349
358
|
y: ev.touches[0].clientY,
|
|
350
359
|
},
|
|
351
360
|
timestamp: Date.now(),
|
|
352
361
|
});
|
|
353
|
-
this.container.lastTouch
|
|
362
|
+
this.container.lastTouch.set({
|
|
354
363
|
position: {
|
|
355
364
|
x: ev.touches[0].clientX,
|
|
356
365
|
y: ev.touches[0].clientY,
|
|
@@ -361,7 +370,9 @@ class BsSwipeDirective {
|
|
|
361
370
|
}
|
|
362
371
|
}
|
|
363
372
|
onTouchMove(ev) {
|
|
364
|
-
|
|
373
|
+
ev.preventDefault();
|
|
374
|
+
ev.stopPropagation();
|
|
375
|
+
this.container.lastTouch.set({
|
|
365
376
|
position: {
|
|
366
377
|
x: ev.touches[0].clientX,
|
|
367
378
|
y: ev.touches[0].clientY,
|
|
@@ -370,29 +381,28 @@ class BsSwipeDirective {
|
|
|
370
381
|
});
|
|
371
382
|
}
|
|
372
383
|
onTouchEnd(ev) {
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
});
|
|
384
|
+
ev.stopPropagation();
|
|
385
|
+
const startTouch = this.container.startTouch();
|
|
386
|
+
const lastTouch = this.container.lastTouch();
|
|
387
|
+
const orientation = this.container.orientation();
|
|
388
|
+
if (!!startTouch && !!lastTouch) {
|
|
389
|
+
const distance = (orientation === 'horizontal')
|
|
390
|
+
? lastTouch.position.x - startTouch.position.x
|
|
391
|
+
: lastTouch.position.y - startTouch.position.y;
|
|
392
|
+
this.container.onSwipe(distance);
|
|
393
|
+
}
|
|
384
394
|
}
|
|
385
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsSwipeDirective, deps: [
|
|
386
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.6", type: BsSwipeDirective, isStandalone:
|
|
395
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsSwipeDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
396
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.0.6", type: BsSwipeDirective, isStandalone: true, selector: "[bsSwipe]", inputs: { offside: { classPropertyName: "offside", publicName: "offside", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "touchstart": "onTouchStart($event)", "touchmove": "onTouchMove($event)", "touchend": "onTouchEnd($event)" }, properties: { "class.align-top": "this.classes", "class.float-none": "this.classes", "class.w-100": "this.classes", "class.pe-auto": "this.classes", "class.me-0": "this.classes", "class.d-inline-block": "this.inlineBlock", "class.d-block": "this.block", "style.height.px": "this.slideHeight" } }, hostDirectives: [{ directive: i1.BsObserveSizeDirective }], ngImport: i0 });
|
|
387
397
|
}
|
|
388
398
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsSwipeDirective, decorators: [{
|
|
389
399
|
type: Directive,
|
|
390
400
|
args: [{
|
|
391
401
|
selector: '[bsSwipe]',
|
|
392
402
|
hostDirectives: [BsObserveSizeDirective],
|
|
393
|
-
standalone:
|
|
403
|
+
standalone: true,
|
|
394
404
|
}]
|
|
395
|
-
}],
|
|
405
|
+
}], propDecorators: { offside: [{ type: i0.Input, args: [{ isSignal: true, alias: "offside", required: false }] }], classes: [{
|
|
396
406
|
type: HostBinding,
|
|
397
407
|
args: ['class.align-top']
|
|
398
408
|
}, {
|
|
@@ -429,14 +439,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
429
439
|
|
|
430
440
|
class BsSwiperModule {
|
|
431
441
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsSwiperModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
432
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.0.6", ngImport: i0, type: BsSwiperModule,
|
|
433
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsSwiperModule
|
|
442
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.0.6", ngImport: i0, type: BsSwiperModule, imports: [BsSwipeDirective, BsSwipeContainerDirective], exports: [BsSwipeDirective, BsSwipeContainerDirective] });
|
|
443
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsSwiperModule });
|
|
434
444
|
}
|
|
435
445
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsSwiperModule, decorators: [{
|
|
436
446
|
type: NgModule,
|
|
437
447
|
args: [{
|
|
438
|
-
imports: [
|
|
439
|
-
declarations: [BsSwipeDirective, BsSwipeContainerDirective],
|
|
448
|
+
imports: [BsSwipeDirective, BsSwipeContainerDirective],
|
|
440
449
|
exports: [BsSwipeDirective, BsSwipeContainerDirective],
|
|
441
450
|
}]
|
|
442
451
|
}] });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mintplayer-ng-swiper-swiper.mjs","sources":["../../../../libs/mintplayer-ng-swiper/swiper/src/directives/swipe-container/swipe-container.directive.ts","../../../../libs/mintplayer-ng-swiper/swiper/src/directives/swipe/swipe.directive.ts","../../../../libs/mintplayer-ng-swiper/swiper/src/swiper.module.ts","../../../../libs/mintplayer-ng-swiper/swiper/mintplayer-ng-swiper-swiper.ts"],"sourcesContent":["import { DOCUMENT } from '@angular/common';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { animate, AnimationBuilder, AnimationPlayer, style } from '@angular/animations';\nimport { AfterViewInit, ContentChildren, DestroyRef, Directive, ElementRef, EventEmitter, forwardRef, HostBinding, Inject, Input, Output, QueryList } from '@angular/core';\nimport { BehaviorSubject, combineLatest, debounceTime, delay, distinctUntilChanged, filter, map, mergeMap, Observable, shareReplay, take } from 'rxjs';\nimport { BsObserveSizeDirective, Size } from '@mintplayer/ng-swiper/observe-size';\nimport { LastTouch } from '../../interfaces/last-touch';\nimport { StartTouch } from '../../interfaces/start-touch';\nimport { BsSwipeDirective } from '../swipe/swipe.directive';\n\n@Directive({\n selector: '[bsSwipeContainer]',\n exportAs: 'bsSwipeContainer',\n standalone: false,\n hostDirectives: [BsObserveSizeDirective],\n})\nexport class BsSwipeContainerDirective implements AfterViewInit {\n\n constructor(element: ElementRef, private animationBuilder: AnimationBuilder, private destroy: DestroyRef, @Inject(DOCUMENT) document: any, private observeSize: BsObserveSizeDirective) {\n this.containerElement = element;\n this.document = <Document>document;\n this.offset$ = combineLatest([\n this.startTouch$,\n this.lastTouch$,\n this.imageIndex$,\n this.isViewInited$,\n this.orientation$,\n this.observeSize.size$,\n ])\n .pipe(map(([startTouch, lastTouch, imageIndex, isViewInited, orientation, containerSize]) => {\n if (!isViewInited) {\n return (-imageIndex * 100);\n } else if (!!startTouch && !!lastTouch) {\n const containerLength = orientation === 'horizontal'\n ? (containerSize?.width ?? this.containerElement.nativeElement.clientWidth)\n : (containerSize?.height ?? this.containerElement.nativeElement.clientHeight);\n if (containerLength === 0) {\n return (-imageIndex * 100);\n }\n const delta = orientation === 'horizontal'\n ? (lastTouch.position.x - startTouch.position.x)\n : (lastTouch.position.y - startTouch.position.y);\n return (-imageIndex * 100 + (delta / containerLength) * 100);\n } else {\n return (-imageIndex * 100);\n }\n }));\n\n this.padLeft$ = this.swipes$.pipe(map(swipes => {\n if (!swipes) {\n return 0;\n }\n\n let count = 0;\n for (const s of swipes) {\n if (!s.offside()) {\n break;\n } else {\n count++;\n }\n }\n return count;\n }));\n\n this.padRight$ = this.swipes$.pipe(map(swipes => {\n if (!swipes) {\n return 0;\n }\n\n let count = 0;\n for (const s of swipes.toArray().reverse()) {\n if (!s.offside()) {\n break;\n } else {\n count++;\n }\n }\n return count;\n }));\n\n this.offsetPrimary$ = combineLatest([this.offset$, this.padLeft$])\n .pipe(map(([offset, padLeft]) => offset - padLeft * 100));\n this.offsetSecondary$ = combineLatest([this.offset$, this.padLeft$, this.padRight$])\n .pipe(map(([offset, padLeft, padRight]) => -(offset - padLeft * 100) - (padRight - 1) * 100));\n combineLatest([this.offsetPrimary$, this.orientation$])\n .pipe(takeUntilDestroyed())\n .subscribe(([offsetPrimary, orientation]) => {\n if (orientation === 'horizontal') {\n this.offsetLeft = offsetPrimary;\n this.offsetTop = null;\n } else {\n this.offsetTop = offsetPrimary;\n this.offsetLeft = null;\n }\n });\n combineLatest([this.offsetSecondary$, this.orientation$])\n .pipe(takeUntilDestroyed())\n .subscribe(([offsetSecondary, orientation]) => {\n if (orientation === 'horizontal') {\n this.offsetRight = offsetSecondary;\n this.offsetBottom = null;\n } else {\n this.offsetBottom = offsetSecondary;\n this.offsetRight = null;\n }\n });\n this.imageIndex$.pipe(takeUntilDestroyed())\n .subscribe(imageIndex => this.imageIndexChange.emit(imageIndex));\n\n this.actualSwipes$ = this.swipes$\n .pipe(map(swipes => {\n if (swipes) {\n return swipes.filter(swipe => !swipe.offside());\n } else {\n return [];\n }\n }));\n\n this.slideSizes$ = this.actualSwipes$\n .pipe(delay(400), filter(swipes => !!swipes))\n .pipe(mergeMap(swipes => combineLatest(swipes.map(swipe => swipe.observeSize.size$))))\n .pipe(shareReplay({ bufferSize: 1, refCount: true }));\n\n this.maxSlideHeight$ = this.slideSizes$\n .pipe(map(slideSizes => {\n const heights = slideSizes.map(s => s?.height ?? 1);\n return heights.length ? Math.max(...heights) : 1;\n }))\n .pipe(shareReplay({ bufferSize: 1, refCount: true }));\n\n this.currentSlideHeight$ = combineLatest([this.slideSizes$, this.imageIndex$, this.orientation$])\n .pipe(map(([slideSizes, imageIndex, orientation]) => {\n const heights = slideSizes.map(s => s?.height ?? 1);\n const maxHeight = heights.length ? Math.max(...heights) : 1;\n const currHeight: number = slideSizes[imageIndex]?.height ?? maxHeight;\n return (orientation === 'vertical') ? maxHeight : currHeight;\n }))\n .pipe(shareReplay({ bufferSize: 1, refCount: true }))\n .pipe(debounceTime(10));\n\n this.orientation$\n .pipe(distinctUntilChanged(), takeUntilDestroyed())\n .subscribe(() => {\n this.offsetLeft = null;\n this.offsetRight = null;\n this.offsetTop = null;\n this.offsetBottom = null;\n });\n }\n\n @HostBinding('style.margin-left.%') offsetLeft: number | null = null;\n @HostBinding('style.margin-right.%') offsetRight: number | null = null;\n @HostBinding('style.margin-top.%') offsetTop: number | null = null;\n @HostBinding('style.margin-bottom.%') offsetBottom: number | null = null;\n @ContentChildren(forwardRef(() => BsSwipeDirective)) set swipes(value: QueryList<BsSwipeDirective>) {\n setTimeout(() => this.swipes$.next(value));\n }\n @Input() minimumOffset = 50;\n\n public get orientation() {\n return this.orientation$.value;\n }\n @Input() public set orientation(value: 'horizontal' | 'vertical') {\n this.orientation$.next(value ?? 'horizontal');\n }\n\n //#region ImageIndex\n public get imageIndex() {\n return this.imageIndex$.value;\n }\n @Input() public set imageIndex(value: number) {\n this.imageIndex$.next(value);\n }\n @Output() imageIndexChange = new EventEmitter<number>();\n //#endregion\n \n actualSwipes$: Observable<BsSwipeDirective[]>;\n isViewInited$ = new BehaviorSubject<boolean>(false);\n startTouch$ = new BehaviorSubject<StartTouch | null>(null);\n lastTouch$ = new BehaviorSubject<LastTouch | null>(null);\n swipes$ = new BehaviorSubject<QueryList<BsSwipeDirective> | null>(null);\n // TODO: slide sizes instead\n slideSizes$: Observable<(Size | undefined)[]>;\n maxSlideHeight$: Observable<number>;\n imageIndex$ = new BehaviorSubject<number>(0);\n currentSlideHeight$: Observable<number>;\n pendingAnimation?: AnimationPlayer;\n containerElement: ElementRef<HTMLDivElement>;\n document: Document;\n\n // TODO: Don't just keep px, but both px and % using currentslidesize$\n offset$: Observable<number>;\n offsetPrimary$: Observable<number>;\n offsetSecondary$: Observable<number>;\n padLeft$: Observable<number>;\n padRight$: Observable<number>;\n\n orientation$ = new BehaviorSubject<'horizontal' | 'vertical'>('horizontal');\n\n ngAfterViewInit() {\n this.isViewInited$.next(true);\n }\n\n animateToIndexByDx(distance: number) {\n combineLatest([this.imageIndex$, this.actualSwipes$])\n .pipe(take(1), takeUntilDestroyed(this.destroy))\n .subscribe(([imageIndex, actualSwipes]) => {\n let newIndex: number;\n if (Math.abs(distance) < this.minimumOffset) {\n newIndex = imageIndex;\n } else {\n newIndex = imageIndex + (distance < 0 ? 1 : -1);\n }\n\n this.animateToIndex(imageIndex, newIndex, distance, actualSwipes?.length ?? 1);\n });\n }\n\n animateToIndex(oldIndex: number, newIndex: number, distance: number, totalSlides: number) {\n const orientation = this.orientation$.value;\n const containerElement = this.containerElement.nativeElement;\n const containerLength = orientation === 'horizontal' ? containerElement.clientWidth : containerElement.clientHeight;\n\n if (orientation === 'horizontal') {\n this.pendingAnimation = this.animationBuilder.build([\n style({\n 'margin-left': (-(oldIndex + 1) * containerLength + distance) + 'px',\n 'margin-right': ((oldIndex + 1) * containerLength - distance) + 'px',\n }),\n animate('500ms ease', style({\n 'margin-left': (-(newIndex + 1) * containerLength) + 'px',\n 'margin-right': ((newIndex + 1) * containerLength) + 'px',\n })),\n ]).create(containerElement);\n } else {\n this.pendingAnimation = this.animationBuilder.build([\n style({\n 'margin-top': (-(oldIndex + 1) * containerLength + distance) + 'px',\n 'margin-bottom': ((oldIndex + 1) * containerLength - distance) + 'px',\n }),\n animate('500ms ease', style({\n 'margin-top': (-(newIndex + 1) * containerLength) + 'px',\n 'margin-bottom': ((newIndex + 1) * containerLength) + 'px',\n })),\n ]).create(containerElement);\n }\n this.pendingAnimation.onDone(() => {\n // Correct the image index\n if (newIndex === -1) {\n this.imageIndex$.next(totalSlides - 1);\n } else if (newIndex === totalSlides) {\n this.imageIndex$.next(0);\n } else {\n this.imageIndex$.next(newIndex);\n }\n this.startTouch$.next(null);\n this.lastTouch$.next(null);\n this.pendingAnimation?.destroy();\n this.pendingAnimation = undefined;\n });\n this.pendingAnimation.play();\n }\n\n onSwipe(distance: number) {\n this.animateToIndexByDx(distance);\n }\n\n previous() {\n this.gotoAnimate(-1, 'relative');\n }\n\n next() {\n this.gotoAnimate(1, 'relative');\n }\n\n goto(index: number) {\n this.gotoAnimate(index, 'absolute');\n }\n\n private gotoAnimate(index: number, type: 'absolute' | 'relative') {\n this.pendingAnimation?.finish();\n setTimeout(() => {\n combineLatest([this.actualSwipes$, this.imageIndex$])\n .pipe(take(1), takeUntilDestroyed(this.destroy))\n .subscribe(([actualSwipes, imageIndex]) => {\n this.pendingAnimation?.finish();\n const idx = (type === 'relative') ? imageIndex + index : index;\n this.animateToIndex(imageIndex, idx, 0, actualSwipes?.length ?? 1);\n });\n }, 20);\n }\n\n}\n","import { DestroyRef, Directive, HostBinding, HostListener, input } from \"@angular/core\";\nimport { BsObserveSizeDirective } from \"@mintplayer/ng-swiper/observe-size\";\nimport { combineLatest, filter, take } from \"rxjs\";\nimport { BsSwipeContainerDirective } from \"../swipe-container/swipe-container.directive\";\nimport { takeUntilDestroyed } from \"@angular/core/rxjs-interop\";\n\n@Directive({\n selector: '[bsSwipe]',\n hostDirectives: [BsObserveSizeDirective],\n standalone: false,\n})\nexport class BsSwipeDirective {\n\n constructor(private container: BsSwipeContainerDirective, observeSize: BsObserveSizeDirective, private destroy: DestroyRef) {\n this.observeSize = observeSize;\n this.container.orientation$\n .pipe(takeUntilDestroyed())\n .subscribe(orientation => {\n this.inlineBlock = (orientation === 'horizontal');\n this.block = (orientation === 'vertical');\n });\n\n combineLatest([this.container.maxSlideHeight$, this.container.orientation$])\n .pipe(takeUntilDestroyed())\n .subscribe(([maxHeight, orientation]) => {\n const targetHeight = (orientation === 'vertical') ? maxHeight : null;\n this.slideHeight = (targetHeight && targetHeight > 0) ? targetHeight : null;\n });\n }\n\n observeSize: BsObserveSizeDirective;\n\n public offside = input(false);\n\n @HostBinding('class.align-top')\n @HostBinding('class.float-none')\n @HostBinding('class.w-100')\n @HostBinding('class.pe-auto')\n @HostBinding('class.me-0')\n classes = true;\n\n @HostBinding('class.d-inline-block') inlineBlock = true;\n @HostBinding('class.d-block') block = false;\n @HostBinding('style.height.px') slideHeight: number | null = null;\n\n @HostListener('touchstart', ['$event'])\n onTouchStart(ev: TouchEvent) {\n if (ev.touches.length === 1) {\n ev.preventDefault();\n this.container.pendingAnimation?.finish();\n\n setTimeout(() => {\n this.container.startTouch$.next({\n position: {\n x: ev.touches[0].clientX,\n y: ev.touches[0].clientY,\n },\n timestamp: Date.now(),\n });\n this.container.lastTouch$.next({\n position: {\n x: ev.touches[0].clientX,\n y: ev.touches[0].clientY,\n },\n isTouching: true,\n });\n }, 20);\n }\n }\n\n @HostListener('touchmove', ['$event'])\n onTouchMove(ev: TouchEvent) {\n this.container.lastTouch$.next({\n position: {\n x: ev.touches[0].clientX,\n y: ev.touches[0].clientY,\n },\n isTouching: true,\n });\n }\n\n @HostListener('touchend', ['$event'])\n onTouchEnd(ev: TouchEvent) {\n combineLatest([this.container.startTouch$, this.container.lastTouch$, this.container.orientation$])\n .pipe(filter(([startTouch, lastTouch]) => !!startTouch && !!lastTouch))\n .pipe(take(1), takeUntilDestroyed(this.destroy))\n .subscribe(([startTouch, lastTouch, orientation]) => {\n if (!!startTouch && !!lastTouch) {\n const distance = (orientation === 'horizontal')\n ? lastTouch.position.x - startTouch.position.x\n : lastTouch.position.y - startTouch.position.y;\n this.container.onSwipe(distance);\n }\n });\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { BsSwipeDirective } from './directives/swipe/swipe.directive';\nimport { BsSwipeContainerDirective } from './directives/swipe-container/swipe-container.directive';\n\n@NgModule({\n imports: [CommonModule],\n declarations: [BsSwipeDirective, BsSwipeContainerDirective],\n exports: [BsSwipeDirective, BsSwipeContainerDirective],\n})\nexport class BsSwiperModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1.BsSwipeContainerDirective"],"mappings":";;;;;;;;;;MAgBa,yBAAyB,CAAA;AAEK,IAAA,gBAAA;AAA4C,IAAA,OAAA;AAA8D,IAAA,WAAA;IAAnJ,WAAA,CAAY,OAAmB,EAAU,gBAAkC,EAAU,OAAmB,EAAoB,QAAa,EAAU,WAAmC,EAAA;QAA7I,IAAA,CAAA,gBAAgB,GAAhB,gBAAgB;QAA4B,IAAA,CAAA,OAAO,GAAP,OAAO;QAAuD,IAAA,CAAA,WAAW,GAAX,WAAW;AAC5J,QAAA,IAAI,CAAC,gBAAgB,GAAG,OAAO;AAC/B,Q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AAC,gBAAgB,EAAE,yBAAyB,CAAC;AAC3D,oBAAA,OAAO,EAAE,CAAC,gBAAgB,EAAE,yBAAyB,CAAC;AACvD,iBAAA;;;ACTD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"mintplayer-ng-swiper-swiper.mjs","sources":["../../../../libs/mintplayer-ng-swiper/swiper/src/directives/swipe-container/swipe-container.directive.ts","../../../../libs/mintplayer-ng-swiper/swiper/src/directives/swipe/swipe.directive.ts","../../../../libs/mintplayer-ng-swiper/swiper/src/swiper.module.ts","../../../../libs/mintplayer-ng-swiper/swiper/mintplayer-ng-swiper-swiper.ts"],"sourcesContent":["import { DOCUMENT } from '@angular/common';\nimport { animate, AnimationBuilder, AnimationPlayer, style } from '@angular/animations';\nimport { AfterViewInit, computed, ContentChildren, Directive, effect, ElementRef, forwardRef, HostBinding, inject, input, model, OnDestroy, output, QueryList, signal } from '@angular/core';\nimport { BsObserveSizeDirective, Size } from '@mintplayer/ng-swiper/observe-size';\nimport { LastTouch } from '../../interfaces/last-touch';\nimport { StartTouch } from '../../interfaces/start-touch';\nimport { BsSwipeDirective } from '../swipe/swipe.directive';\n\n@Directive({\n selector: '[bsSwipeContainer]',\n exportAs: 'bsSwipeContainer',\n standalone: true,\n hostDirectives: [BsObserveSizeDirective],\n})\nexport class BsSwipeContainerDirective implements AfterViewInit, OnDestroy {\n private animationBuilder = inject(AnimationBuilder);\n private observeSize = inject(BsObserveSizeDirective);\n containerElement = inject(ElementRef<HTMLDivElement>);\n document = inject(DOCUMENT) as Document;\n\n @HostBinding('style.margin-left.%') offsetLeft: number | null = null;\n @HostBinding('style.margin-right.%') offsetRight: number | null = null;\n @HostBinding('style.margin-top.px') offsetTopPx: number | null = null;\n @HostBinding('style.margin-bottom.px') offsetBottomPx: number | null = null;\n\n @ContentChildren(forwardRef(() => BsSwipeDirective)) set swipes(value: QueryList<BsSwipeDirective>) {\n setTimeout(() => this._swipes.set(value));\n }\n\n minimumOffset = input(50);\n animation = input<'slide' | 'fade' | 'none'>('slide');\n orientation = input<'horizontal' | 'vertical'>('horizontal');\n imageIndex = model<number>(0);\n animationStart = output<void>();\n animationEnd = output<void>();\n\n isViewInited = signal<boolean>(false);\n isAnimating = signal<boolean>(false);\n private isDestroyed = false;\n startTouch = signal<StartTouch | null>(null);\n lastTouch = signal<LastTouch | null>(null);\n _swipes = signal<QueryList<BsSwipeDirective> | null>(null);\n pendingAnimation?: AnimationPlayer;\n\n // Computed signals for derived state\n offset = computed(() => {\n const startTouch = this.startTouch();\n const lastTouch = this.lastTouch();\n const imageIndex = this.imageIndex();\n const isViewInited = this.isViewInited();\n const orientation = this.orientation();\n const containerSize = this.observeSize.size();\n const maxSlideHeight = this.maxSlideHeight();\n\n if (!isViewInited) {\n return (-imageIndex * 100);\n } else if (!!startTouch && !!lastTouch) {\n // For horizontal: use container width\n // For vertical: use maxSlideHeight (single slide height, not total container height)\n const containerLength = orientation === 'horizontal'\n ? (containerSize?.width ?? this.containerElement.nativeElement.clientWidth)\n : maxSlideHeight;\n if (containerLength === 0) {\n return (-imageIndex * 100);\n }\n const delta = orientation === 'horizontal'\n ? (lastTouch.position.x - startTouch.position.x)\n : (lastTouch.position.y - startTouch.position.y);\n return (-imageIndex * 100 + (delta / containerLength) * 100);\n } else {\n return (-imageIndex * 100);\n }\n });\n\n padLeft = computed(() => {\n const swipes = this._swipes();\n if (!swipes) return 0;\n\n let count = 0;\n for (const s of swipes) {\n if (!s.offside()) {\n break;\n } else {\n count++;\n }\n }\n return count;\n });\n\n padRight = computed(() => {\n const swipes = this._swipes();\n if (!swipes) return 0;\n\n let count = 0;\n for (const s of swipes.toArray().reverse()) {\n if (!s.offside()) {\n break;\n } else {\n count++;\n }\n }\n return count;\n });\n\n offsetPrimary = computed(() => this.offset() - this.padLeft() * 100);\n offsetSecondary = computed(() => -(this.offset() - this.padLeft() * 100) - (this.padRight() - 1) * 100);\n\n actualSwipes = computed(() => {\n const swipes = this._swipes();\n if (swipes) {\n return swipes.filter(swipe => !swipe.offside());\n } else {\n return [];\n }\n });\n\n // Computed signal that reactively tracks all swipe sizes\n private slideSizes = computed(() => {\n const actualSwipes = this.actualSwipes();\n if (!actualSwipes || actualSwipes.length === 0) {\n return [];\n }\n // Reading each swipe's size() creates reactive dependencies\n return actualSwipes.map(swipe => swipe.observeSize.size());\n });\n\n maxSlideHeight = computed(() => {\n const slideSizes = this.slideSizes();\n const heights = slideSizes.map(s => s?.height ?? 1);\n return heights.length ? Math.max(...heights) : 1;\n });\n\n currentSlideHeight = computed<number | null>(() => {\n const slideSizes = this.slideSizes();\n const imageIndex = this.imageIndex();\n const orientation = this.orientation();\n const heights = slideSizes.map(s => s?.height ?? 0);\n const maxHeight = heights.length ? Math.max(...heights) : 0;\n const currHeight: number = slideSizes[imageIndex]?.height ?? maxHeight;\n const result = (orientation === 'vertical') ? maxHeight : currHeight;\n // Return null if measurements aren't valid yet to avoid collapsing the carousel\n return result > 10 ? result : null;\n });\n\n constructor() {\n // Effect to update offsetLeft/offsetTopPx based on offsetPrimary and orientation\n effect(() => {\n const offsetPrimary = this.offsetPrimary();\n const orientation = this.orientation();\n const maxSlideHeight = this.maxSlideHeight();\n const isAnimating = this.isAnimating();\n\n // Skip updating offsets during animation to avoid interfering with CSS animation\n if (isAnimating) {\n return;\n }\n\n if (orientation === 'horizontal') {\n this.offsetLeft = offsetPrimary;\n this.offsetTopPx = null;\n } else {\n // For vertical mode, convert percentage to pixels using slide height\n // offsetPrimary is in percentage units (e.g., -100 means -100%)\n // We need to convert to pixels based on actual slide height\n this.offsetTopPx = (offsetPrimary / 100) * maxSlideHeight;\n this.offsetLeft = null;\n }\n });\n\n // Effect to update offsetRight/offsetBottomPx based on offsetSecondary and orientation\n effect(() => {\n const offsetSecondary = this.offsetSecondary();\n const orientation = this.orientation();\n const maxSlideHeight = this.maxSlideHeight();\n const isAnimating = this.isAnimating();\n\n // Skip updating offsets during animation to avoid interfering with CSS animation\n if (isAnimating) {\n return;\n }\n\n if (orientation === 'horizontal') {\n this.offsetRight = offsetSecondary;\n this.offsetBottomPx = null;\n } else {\n // For vertical mode, convert percentage to pixels using slide height\n this.offsetBottomPx = (offsetSecondary / 100) * maxSlideHeight;\n this.offsetRight = null;\n }\n });\n\n }\n\n ngAfterViewInit() {\n this.isViewInited.set(true);\n }\n\n ngOnDestroy() {\n this.isDestroyed = true;\n this.pendingAnimation?.destroy();\n }\n\n animateToIndexByDx(distance: number) {\n const imageIndex = this.imageIndex();\n const actualSwipes = this.actualSwipes();\n\n let newIndex: number;\n if (Math.abs(distance) < this.minimumOffset()) {\n newIndex = imageIndex;\n } else {\n newIndex = imageIndex + (distance < 0 ? 1 : -1);\n }\n\n this.animateToIndex(imageIndex, newIndex, distance, actualSwipes?.length ?? 1);\n }\n\n animateToIndex(oldIndex: number, newIndex: number, distance: number, totalSlides: number) {\n const animation = this.animation();\n const orientation = this.orientation();\n const containerElement = this.containerElement.nativeElement;\n const maxSlideHeight = this.maxSlideHeight();\n // For vertical mode, use maxSlideHeight instead of container height\n const containerLength = orientation === 'horizontal'\n ? containerElement.clientWidth\n : maxSlideHeight;\n\n this.animationStart.emit();\n\n // Handle 'none' animation mode - instant transition\n if (animation === 'none') {\n // Correct the image index immediately\n if (newIndex === -1) {\n this.imageIndex.set(totalSlides - 1);\n } else if (newIndex === totalSlides) {\n this.imageIndex.set(0);\n } else {\n this.imageIndex.set(newIndex);\n }\n this.startTouch.set(null);\n this.lastTouch.set(null);\n this.animationEnd.emit();\n return;\n }\n\n // Set animating flag and clear host bindings so animation has full control\n this.isAnimating.set(true);\n if (orientation === 'horizontal') {\n this.offsetLeft = null;\n this.offsetRight = null;\n } else {\n this.offsetTopPx = null;\n this.offsetBottomPx = null;\n }\n\n if (orientation === 'horizontal') {\n this.pendingAnimation = this.animationBuilder.build([\n style({\n 'margin-left': (-(oldIndex + 1) * containerLength + distance) + 'px',\n 'margin-right': ((oldIndex + 1) * containerLength - distance) + 'px',\n }),\n animate('500ms ease', style({\n 'margin-left': (-(newIndex + 1) * containerLength) + 'px',\n 'margin-right': ((newIndex + 1) * containerLength) + 'px',\n })),\n ]).create(containerElement);\n } else {\n this.pendingAnimation = this.animationBuilder.build([\n style({\n 'margin-top': (-(oldIndex + 1) * containerLength + distance) + 'px',\n 'margin-bottom': ((oldIndex + 1) * containerLength - distance) + 'px',\n }),\n animate('500ms ease', style({\n 'margin-top': (-(newIndex + 1) * containerLength) + 'px',\n 'margin-bottom': ((newIndex + 1) * containerLength) + 'px',\n })),\n ]).create(containerElement);\n }\n this.pendingAnimation.onDone(() => {\n if (this.isDestroyed) return;\n // Correct the image index\n if (newIndex === -1) {\n this.imageIndex.set(totalSlides - 1);\n } else if (newIndex === totalSlides) {\n this.imageIndex.set(0);\n } else {\n this.imageIndex.set(newIndex);\n }\n this.startTouch.set(null);\n this.lastTouch.set(null);\n this.pendingAnimation?.destroy();\n this.pendingAnimation = undefined;\n // Clear animating flag so effects can update offsets again\n this.isAnimating.set(false);\n this.animationEnd.emit();\n });\n this.pendingAnimation.play();\n }\n\n onSwipe(distance: number) {\n this.animateToIndexByDx(distance);\n }\n\n previous() {\n this.gotoAnimate(-1, 'relative');\n }\n\n next() {\n this.gotoAnimate(1, 'relative');\n }\n\n goto(index: number) {\n this.gotoAnimate(index, 'absolute');\n }\n\n private gotoAnimate(index: number, type: 'absolute' | 'relative') {\n this.pendingAnimation?.finish();\n setTimeout(() => {\n if (this.isDestroyed) return;\n this.pendingAnimation?.finish();\n const actualSwipes = this.actualSwipes();\n const imageIndex = this.imageIndex();\n const idx = (type === 'relative') ? imageIndex + index : index;\n this.animateToIndex(imageIndex, idx, 0, actualSwipes?.length ?? 1);\n }, 20);\n }\n\n}\n","import { Directive, effect, HostBinding, HostListener, inject, input } from \"@angular/core\";\nimport { BsObserveSizeDirective } from \"@mintplayer/ng-swiper/observe-size\";\nimport { BsSwipeContainerDirective } from \"../swipe-container/swipe-container.directive\";\n\n@Directive({\n selector: '[bsSwipe]',\n hostDirectives: [BsObserveSizeDirective],\n standalone: true,\n})\nexport class BsSwipeDirective {\n private container = inject(BsSwipeContainerDirective);\n observeSize = inject(BsObserveSizeDirective);\n\n public offside = input(false);\n\n private orientationEffect = effect(() => {\n const orientation = this.container.orientation();\n this.inlineBlock = (orientation === 'horizontal');\n this.block = (orientation === 'vertical');\n });\n\n private heightEffect = effect(() => {\n const maxHeight = this.container.maxSlideHeight();\n const orientation = this.container.orientation();\n // Only set height when we have valid measurements (> 10px threshold)\n // to avoid circular dependency during initial load\n const targetHeight = (orientation === 'vertical' && maxHeight > 10) ? maxHeight : null;\n this.slideHeight = targetHeight;\n });\n\n @HostBinding('class.align-top')\n @HostBinding('class.float-none')\n @HostBinding('class.w-100')\n @HostBinding('class.pe-auto')\n @HostBinding('class.me-0')\n classes = true;\n\n @HostBinding('class.d-inline-block') inlineBlock = true;\n @HostBinding('class.d-block') block = false;\n @HostBinding('style.height.px') slideHeight: number | null = null;\n\n @HostListener('touchstart', ['$event'])\n onTouchStart(ev: TouchEvent) {\n if (ev.touches.length === 1) {\n ev.preventDefault();\n ev.stopPropagation();\n this.container.pendingAnimation?.finish();\n\n setTimeout(() => {\n this.container.startTouch.set({\n position: {\n x: ev.touches[0].clientX,\n y: ev.touches[0].clientY,\n },\n timestamp: Date.now(),\n });\n this.container.lastTouch.set({\n position: {\n x: ev.touches[0].clientX,\n y: ev.touches[0].clientY,\n },\n isTouching: true,\n });\n }, 20);\n }\n }\n\n @HostListener('touchmove', ['$event'])\n onTouchMove(ev: TouchEvent) {\n ev.preventDefault();\n ev.stopPropagation();\n this.container.lastTouch.set({\n position: {\n x: ev.touches[0].clientX,\n y: ev.touches[0].clientY,\n },\n isTouching: true,\n });\n }\n\n @HostListener('touchend', ['$event'])\n onTouchEnd(ev: TouchEvent) {\n ev.stopPropagation();\n const startTouch = this.container.startTouch();\n const lastTouch = this.container.lastTouch();\n const orientation = this.container.orientation();\n\n if (!!startTouch && !!lastTouch) {\n const distance = (orientation === 'horizontal')\n ? lastTouch.position.x - startTouch.position.x\n : lastTouch.position.y - startTouch.position.y;\n this.container.onSwipe(distance);\n }\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { BsSwipeDirective } from './directives/swipe/swipe.directive';\nimport { BsSwipeContainerDirective } from './directives/swipe-container/swipe-container.directive';\n\n@NgModule({\n imports: [BsSwipeDirective, BsSwipeContainerDirective],\n exports: [BsSwipeDirective, BsSwipeContainerDirective],\n})\nexport class BsSwiperModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MAca,yBAAyB,CAAA;AAC5B,IAAA,gBAAgB,GAAG,MAAM,CAAC,gBAAgB,CAAC;AAC3C,IAAA,WAAW,GAAG,MAAM,CAAC,sBAAsB,CAAC;AACpD,IAAA,gBAAgB,GAAG,MAAM,EAAC,UAA0B,EAAC;AACrD,IAAA,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAa;IAEH,UAAU,GAAkB,IAAI;IAC/B,WAAW,GAAkB,IAAI;IAClC,WAAW,GAAkB,IAAI;IAC9B,cAAc,GAAkB,IAAI;IAE3E,IAAyD,MAAM,CAAC,KAAkC,EAAA;AAChG,QAAA,UAAU,CAAC,MAAM,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IAC3C;AAEA,IAAA,aAAa,GAAG,KAAK,CAAC,EAAE,yDAAC;AACzB,IAAA,SAAS,GAAG,KAAK,CAA4B,OAAO,qDAAC;AACrD,IAAA,WAAW,GAAG,KAAK,CAA4B,YAAY,uDAAC;AAC5D,IAAA,UAAU,GAAG,KAAK,CAAS,CAAC,sDAAC;IAC7B,cAAc,GAAG,MAAM,EAAQ;IAC/B,YAAY,GAAG,MAAM,EAAQ;AAE7B,IAAA,YAAY,GAAG,MAAM,CAAU,KAAK,wDAAC;AACrC,IAAA,WAAW,GAAG,MAAM,CAAU,KAAK,uDAAC;IAC5B,WAAW,GAAG,KAAK;AAC3B,IAAA,UAAU,GAAG,MAAM,CAAoB,I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BAC3B,WAAW;uBAAC,YAAY;;sBAGxB,WAAW;uBAAC,sBAAsB;;sBAClC,WAAW;uBAAC,eAAe;;sBAC3B,WAAW;uBAAC,iBAAiB;;sBAE7B,YAAY;uBAAC,YAAY,EAAE,CAAC,QAAQ,CAAC;;sBA0BrC,YAAY;uBAAC,WAAW,EAAE,CAAC,QAAQ,CAAC;;sBAapC,YAAY;uBAAC,UAAU,EAAE,CAAC,QAAQ,CAAC;;;MCxEzB,cAAc,CAAA;uGAAd,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;AAAd,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,YAHf,gBAAgB,EAAE,yBAAyB,CAAA,EAAA,OAAA,EAAA,CAC3C,gBAAgB,EAAE,yBAAyB,CAAA,EAAA,CAAA;wGAE1C,cAAc,EAAA,CAAA;;2FAAd,cAAc,EAAA,UAAA,EAAA,CAAA;kBAJ1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,gBAAgB,EAAE,yBAAyB,CAAC;AACtD,oBAAA,OAAO,EAAE,CAAC,gBAAgB,EAAE,yBAAyB,CAAC;AACvD,iBAAA;;;ACPD;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { AfterViewInit, OnDestroy
|
|
3
|
-
import { BehaviorSubject, Observable } from 'rxjs';
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { AfterViewInit, OnDestroy } from '@angular/core';
|
|
4
3
|
|
|
5
4
|
interface Size {
|
|
6
5
|
width: number;
|
|
@@ -11,15 +10,15 @@ declare class BsObserveSizeDirective implements AfterViewInit, OnDestroy {
|
|
|
11
10
|
private element;
|
|
12
11
|
private platformId;
|
|
13
12
|
private zone;
|
|
14
|
-
constructor(element: ElementRef, platformId: any, zone: NgZone);
|
|
15
13
|
private observer?;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
constructor();
|
|
15
|
+
size: _angular_core.WritableSignal<Size | undefined>;
|
|
16
|
+
width: _angular_core.Signal<number | undefined>;
|
|
17
|
+
height: _angular_core.Signal<number | undefined>;
|
|
19
18
|
ngAfterViewInit(): void;
|
|
20
19
|
ngOnDestroy(): void;
|
|
21
|
-
static ɵfac:
|
|
22
|
-
static ɵdir:
|
|
20
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BsObserveSizeDirective, never>;
|
|
21
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BsObserveSizeDirective, "[bsObserveSize]", ["bsObserveSize"], {}, {}, never, never, true, never>;
|
|
23
22
|
}
|
|
24
23
|
|
|
25
24
|
export { BsObserveSizeDirective };
|
|
@@ -1,10 +1,25 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { AfterViewInit,
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { AfterViewInit, OnDestroy, ElementRef, QueryList } from '@angular/core';
|
|
3
3
|
import * as i1 from '@mintplayer/ng-swiper/observe-size';
|
|
4
|
-
import { BsObserveSizeDirective
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
import { BsObserveSizeDirective } from '@mintplayer/ng-swiper/observe-size';
|
|
5
|
+
import { AnimationPlayer } from '@angular/animations';
|
|
6
|
+
|
|
7
|
+
declare class BsSwipeDirective {
|
|
8
|
+
private container;
|
|
9
|
+
observeSize: BsObserveSizeDirective;
|
|
10
|
+
offside: _angular_core.InputSignal<boolean>;
|
|
11
|
+
private orientationEffect;
|
|
12
|
+
private heightEffect;
|
|
13
|
+
classes: boolean;
|
|
14
|
+
inlineBlock: boolean;
|
|
15
|
+
block: boolean;
|
|
16
|
+
slideHeight: number | null;
|
|
17
|
+
onTouchStart(ev: TouchEvent): void;
|
|
18
|
+
onTouchMove(ev: TouchEvent): void;
|
|
19
|
+
onTouchEnd(ev: TouchEvent): void;
|
|
20
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BsSwipeDirective, never>;
|
|
21
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BsSwipeDirective, "[bsSwipe]", never, { "offside": { "alias": "offside"; "required": false; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof i1.BsObserveSizeDirective; inputs: {}; outputs: {}; }]>;
|
|
22
|
+
}
|
|
8
23
|
|
|
9
24
|
interface Point {
|
|
10
25
|
x: number;
|
|
@@ -21,41 +36,41 @@ interface StartTouch {
|
|
|
21
36
|
timestamp: number;
|
|
22
37
|
}
|
|
23
38
|
|
|
24
|
-
declare class BsSwipeContainerDirective implements AfterViewInit {
|
|
39
|
+
declare class BsSwipeContainerDirective implements AfterViewInit, OnDestroy {
|
|
25
40
|
private animationBuilder;
|
|
26
|
-
private destroy;
|
|
27
41
|
private observeSize;
|
|
28
|
-
|
|
42
|
+
containerElement: ElementRef<any>;
|
|
43
|
+
document: Document;
|
|
29
44
|
offsetLeft: number | null;
|
|
30
45
|
offsetRight: number | null;
|
|
31
|
-
|
|
32
|
-
|
|
46
|
+
offsetTopPx: number | null;
|
|
47
|
+
offsetBottomPx: number | null;
|
|
33
48
|
set swipes(value: QueryList<BsSwipeDirective>);
|
|
34
|
-
minimumOffset: number
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
maxSlideHeight$: Observable<number>;
|
|
47
|
-
imageIndex$: BehaviorSubject<number>;
|
|
48
|
-
currentSlideHeight$: Observable<number>;
|
|
49
|
+
minimumOffset: _angular_core.InputSignal<number>;
|
|
50
|
+
animation: _angular_core.InputSignal<"slide" | "fade" | "none">;
|
|
51
|
+
orientation: _angular_core.InputSignal<"horizontal" | "vertical">;
|
|
52
|
+
imageIndex: _angular_core.ModelSignal<number>;
|
|
53
|
+
animationStart: _angular_core.OutputEmitterRef<void>;
|
|
54
|
+
animationEnd: _angular_core.OutputEmitterRef<void>;
|
|
55
|
+
isViewInited: _angular_core.WritableSignal<boolean>;
|
|
56
|
+
isAnimating: _angular_core.WritableSignal<boolean>;
|
|
57
|
+
private isDestroyed;
|
|
58
|
+
startTouch: _angular_core.WritableSignal<StartTouch | null>;
|
|
59
|
+
lastTouch: _angular_core.WritableSignal<LastTouch | null>;
|
|
60
|
+
_swipes: _angular_core.WritableSignal<QueryList<BsSwipeDirective> | null>;
|
|
49
61
|
pendingAnimation?: AnimationPlayer;
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
offsetPrimary
|
|
54
|
-
offsetSecondary
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
62
|
+
offset: _angular_core.Signal<number>;
|
|
63
|
+
padLeft: _angular_core.Signal<number>;
|
|
64
|
+
padRight: _angular_core.Signal<number>;
|
|
65
|
+
offsetPrimary: _angular_core.Signal<number>;
|
|
66
|
+
offsetSecondary: _angular_core.Signal<number>;
|
|
67
|
+
actualSwipes: _angular_core.Signal<BsSwipeDirective[]>;
|
|
68
|
+
private slideSizes;
|
|
69
|
+
maxSlideHeight: _angular_core.Signal<number>;
|
|
70
|
+
currentSlideHeight: _angular_core.Signal<number | null>;
|
|
71
|
+
constructor();
|
|
58
72
|
ngAfterViewInit(): void;
|
|
73
|
+
ngOnDestroy(): void;
|
|
59
74
|
animateToIndexByDx(distance: number): void;
|
|
60
75
|
animateToIndex(oldIndex: number, newIndex: number, distance: number, totalSlides: number): void;
|
|
61
76
|
onSwipe(distance: number): void;
|
|
@@ -63,31 +78,14 @@ declare class BsSwipeContainerDirective implements AfterViewInit {
|
|
|
63
78
|
next(): void;
|
|
64
79
|
goto(index: number): void;
|
|
65
80
|
private gotoAnimate;
|
|
66
|
-
static ɵfac:
|
|
67
|
-
static ɵdir:
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
declare class BsSwipeDirective {
|
|
71
|
-
private container;
|
|
72
|
-
private destroy;
|
|
73
|
-
constructor(container: BsSwipeContainerDirective, observeSize: BsObserveSizeDirective, destroy: DestroyRef);
|
|
74
|
-
observeSize: BsObserveSizeDirective;
|
|
75
|
-
offside: i0.InputSignal<boolean>;
|
|
76
|
-
classes: boolean;
|
|
77
|
-
inlineBlock: boolean;
|
|
78
|
-
block: boolean;
|
|
79
|
-
slideHeight: number | null;
|
|
80
|
-
onTouchStart(ev: TouchEvent): void;
|
|
81
|
-
onTouchMove(ev: TouchEvent): void;
|
|
82
|
-
onTouchEnd(ev: TouchEvent): void;
|
|
83
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<BsSwipeDirective, never>;
|
|
84
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<BsSwipeDirective, "[bsSwipe]", never, { "offside": { "alias": "offside"; "required": false; "isSignal": true; }; }, {}, never, never, false, [{ directive: typeof i1.BsObserveSizeDirective; inputs: {}; outputs: {}; }]>;
|
|
81
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BsSwipeContainerDirective, never>;
|
|
82
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BsSwipeContainerDirective, "[bsSwipeContainer]", ["bsSwipeContainer"], { "minimumOffset": { "alias": "minimumOffset"; "required": false; "isSignal": true; }; "animation": { "alias": "animation"; "required": false; "isSignal": true; }; "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; "imageIndex": { "alias": "imageIndex"; "required": false; "isSignal": true; }; }, { "imageIndex": "imageIndexChange"; "animationStart": "animationStart"; "animationEnd": "animationEnd"; }, ["swipes"], never, true, [{ directive: typeof i1.BsObserveSizeDirective; inputs: {}; outputs: {}; }]>;
|
|
85
83
|
}
|
|
86
84
|
|
|
87
85
|
declare class BsSwiperModule {
|
|
88
|
-
static ɵfac:
|
|
89
|
-
static ɵmod:
|
|
90
|
-
static ɵinj:
|
|
86
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BsSwiperModule, never>;
|
|
87
|
+
static ɵmod: _angular_core.ɵɵNgModuleDeclaration<BsSwiperModule, never, [typeof BsSwipeDirective, typeof BsSwipeContainerDirective], [typeof BsSwipeDirective, typeof BsSwipeContainerDirective]>;
|
|
88
|
+
static ɵinj: _angular_core.ɵɵInjectorDeclaration<BsSwiperModule>;
|
|
91
89
|
}
|
|
92
90
|
|
|
93
91
|
export { BsSwipeContainerDirective, BsSwipeDirective, BsSwiperModule };
|