@mintplayer/ng-swiper 21.0.0 → 21.1.0
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 +250 -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 +51 -55
|
@@ -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,226 @@
|
|
|
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
|
+
startTouch = signal(null, ...(ngDevMode ? [{ debugName: "startTouch" }] : []));
|
|
29
|
+
lastTouch = signal(null, ...(ngDevMode ? [{ debugName: "lastTouch" }] : []));
|
|
30
|
+
_swipes = signal(null, ...(ngDevMode ? [{ debugName: "_swipes" }] : []));
|
|
31
|
+
pendingAnimation;
|
|
32
|
+
// Computed signals for derived state
|
|
33
|
+
offset = computed(() => {
|
|
34
|
+
const startTouch = this.startTouch();
|
|
35
|
+
const lastTouch = this.lastTouch();
|
|
36
|
+
const imageIndex = this.imageIndex();
|
|
37
|
+
const isViewInited = this.isViewInited();
|
|
38
|
+
const orientation = this.orientation();
|
|
39
|
+
const containerSize = this.observeSize.size();
|
|
40
|
+
const maxSlideHeight = this.maxSlideHeight();
|
|
41
|
+
if (!isViewInited) {
|
|
42
|
+
return (-imageIndex * 100);
|
|
43
|
+
}
|
|
44
|
+
else if (!!startTouch && !!lastTouch) {
|
|
45
|
+
// For horizontal: use container width
|
|
46
|
+
// For vertical: use maxSlideHeight (single slide height, not total container height)
|
|
47
|
+
const containerLength = orientation === 'horizontal'
|
|
48
|
+
? (containerSize?.width ?? this.containerElement.nativeElement.clientWidth)
|
|
49
|
+
: maxSlideHeight;
|
|
50
|
+
if (containerLength === 0) {
|
|
31
51
|
return (-imageIndex * 100);
|
|
32
52
|
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
53
|
+
const delta = orientation === 'horizontal'
|
|
54
|
+
? (lastTouch.position.x - startTouch.position.x)
|
|
55
|
+
: (lastTouch.position.y - startTouch.position.y);
|
|
56
|
+
return (-imageIndex * 100 + (delta / containerLength) * 100);
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
return (-imageIndex * 100);
|
|
60
|
+
}
|
|
61
|
+
}, ...(ngDevMode ? [{ debugName: "offset" }] : []));
|
|
62
|
+
padLeft = computed(() => {
|
|
63
|
+
const swipes = this._swipes();
|
|
64
|
+
if (!swipes)
|
|
65
|
+
return 0;
|
|
66
|
+
let count = 0;
|
|
67
|
+
for (const s of swipes) {
|
|
68
|
+
if (!s.offside()) {
|
|
69
|
+
break;
|
|
44
70
|
}
|
|
45
71
|
else {
|
|
46
|
-
|
|
72
|
+
count++;
|
|
47
73
|
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
count++;
|
|
60
|
-
}
|
|
74
|
+
}
|
|
75
|
+
return count;
|
|
76
|
+
}, ...(ngDevMode ? [{ debugName: "padLeft" }] : []));
|
|
77
|
+
padRight = computed(() => {
|
|
78
|
+
const swipes = this._swipes();
|
|
79
|
+
if (!swipes)
|
|
80
|
+
return 0;
|
|
81
|
+
let count = 0;
|
|
82
|
+
for (const s of swipes.toArray().reverse()) {
|
|
83
|
+
if (!s.offside()) {
|
|
84
|
+
break;
|
|
61
85
|
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
this.padRight$ = this.swipes$.pipe(map(swipes => {
|
|
65
|
-
if (!swipes) {
|
|
66
|
-
return 0;
|
|
86
|
+
else {
|
|
87
|
+
count++;
|
|
67
88
|
}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
89
|
+
}
|
|
90
|
+
return count;
|
|
91
|
+
}, ...(ngDevMode ? [{ debugName: "padRight" }] : []));
|
|
92
|
+
offsetPrimary = computed(() => this.offset() - this.padLeft() * 100, ...(ngDevMode ? [{ debugName: "offsetPrimary" }] : []));
|
|
93
|
+
offsetSecondary = computed(() => -(this.offset() - this.padLeft() * 100) - (this.padRight() - 1) * 100, ...(ngDevMode ? [{ debugName: "offsetSecondary" }] : []));
|
|
94
|
+
actualSwipes = computed(() => {
|
|
95
|
+
const swipes = this._swipes();
|
|
96
|
+
if (swipes) {
|
|
97
|
+
return swipes.filter(swipe => !swipe.offside());
|
|
98
|
+
}
|
|
99
|
+
else {
|
|
100
|
+
return [];
|
|
101
|
+
}
|
|
102
|
+
}, ...(ngDevMode ? [{ debugName: "actualSwipes" }] : []));
|
|
103
|
+
// Computed signal that reactively tracks all swipe sizes
|
|
104
|
+
slideSizes = computed(() => {
|
|
105
|
+
const actualSwipes = this.actualSwipes();
|
|
106
|
+
if (!actualSwipes || actualSwipes.length === 0) {
|
|
107
|
+
return [];
|
|
108
|
+
}
|
|
109
|
+
// Reading each swipe's size() creates reactive dependencies
|
|
110
|
+
return actualSwipes.map(swipe => swipe.observeSize.size());
|
|
111
|
+
}, ...(ngDevMode ? [{ debugName: "slideSizes" }] : []));
|
|
112
|
+
maxSlideHeight = computed(() => {
|
|
113
|
+
const slideSizes = this.slideSizes();
|
|
114
|
+
const heights = slideSizes.map(s => s?.height ?? 1);
|
|
115
|
+
return heights.length ? Math.max(...heights) : 1;
|
|
116
|
+
}, ...(ngDevMode ? [{ debugName: "maxSlideHeight" }] : []));
|
|
117
|
+
currentSlideHeight = computed(() => {
|
|
118
|
+
const slideSizes = this.slideSizes();
|
|
119
|
+
const imageIndex = this.imageIndex();
|
|
120
|
+
const orientation = this.orientation();
|
|
121
|
+
const heights = slideSizes.map(s => s?.height ?? 0);
|
|
122
|
+
const maxHeight = heights.length ? Math.max(...heights) : 0;
|
|
123
|
+
const currHeight = slideSizes[imageIndex]?.height ?? maxHeight;
|
|
124
|
+
const result = (orientation === 'vertical') ? maxHeight : currHeight;
|
|
125
|
+
// Return null if measurements aren't valid yet to avoid collapsing the carousel
|
|
126
|
+
return result > 10 ? result : null;
|
|
127
|
+
}, ...(ngDevMode ? [{ debugName: "currentSlideHeight" }] : []));
|
|
128
|
+
constructor() {
|
|
129
|
+
// Effect to update offsetLeft/offsetTopPx based on offsetPrimary and orientation
|
|
130
|
+
effect(() => {
|
|
131
|
+
const offsetPrimary = this.offsetPrimary();
|
|
132
|
+
const orientation = this.orientation();
|
|
133
|
+
const maxSlideHeight = this.maxSlideHeight();
|
|
134
|
+
const isAnimating = this.isAnimating();
|
|
135
|
+
// Skip updating offsets during animation to avoid interfering with CSS animation
|
|
136
|
+
if (isAnimating) {
|
|
137
|
+
return;
|
|
76
138
|
}
|
|
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
139
|
if (orientation === 'horizontal') {
|
|
87
140
|
this.offsetLeft = offsetPrimary;
|
|
88
|
-
this.
|
|
141
|
+
this.offsetTopPx = null;
|
|
89
142
|
}
|
|
90
143
|
else {
|
|
91
|
-
|
|
144
|
+
// For vertical mode, convert percentage to pixels using slide height
|
|
145
|
+
// offsetPrimary is in percentage units (e.g., -100 means -100%)
|
|
146
|
+
// We need to convert to pixels based on actual slide height
|
|
147
|
+
this.offsetTopPx = (offsetPrimary / 100) * maxSlideHeight;
|
|
92
148
|
this.offsetLeft = null;
|
|
93
149
|
}
|
|
94
150
|
});
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
.
|
|
151
|
+
// Effect to update offsetRight/offsetBottomPx based on offsetSecondary and orientation
|
|
152
|
+
effect(() => {
|
|
153
|
+
const offsetSecondary = this.offsetSecondary();
|
|
154
|
+
const orientation = this.orientation();
|
|
155
|
+
const maxSlideHeight = this.maxSlideHeight();
|
|
156
|
+
const isAnimating = this.isAnimating();
|
|
157
|
+
// Skip updating offsets during animation to avoid interfering with CSS animation
|
|
158
|
+
if (isAnimating) {
|
|
159
|
+
return;
|
|
160
|
+
}
|
|
98
161
|
if (orientation === 'horizontal') {
|
|
99
162
|
this.offsetRight = offsetSecondary;
|
|
100
|
-
this.
|
|
163
|
+
this.offsetBottomPx = null;
|
|
101
164
|
}
|
|
102
165
|
else {
|
|
103
|
-
|
|
166
|
+
// For vertical mode, convert percentage to pixels using slide height
|
|
167
|
+
this.offsetBottomPx = (offsetSecondary / 100) * maxSlideHeight;
|
|
104
168
|
this.offsetRight = null;
|
|
105
169
|
}
|
|
106
170
|
});
|
|
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
171
|
}
|
|
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
172
|
ngAfterViewInit() {
|
|
190
|
-
this.isViewInited
|
|
173
|
+
this.isViewInited.set(true);
|
|
191
174
|
}
|
|
192
175
|
animateToIndexByDx(distance) {
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
this.animateToIndex(imageIndex, newIndex, distance, actualSwipes?.length ?? 1);
|
|
204
|
-
});
|
|
176
|
+
const imageIndex = this.imageIndex();
|
|
177
|
+
const actualSwipes = this.actualSwipes();
|
|
178
|
+
let newIndex;
|
|
179
|
+
if (Math.abs(distance) < this.minimumOffset()) {
|
|
180
|
+
newIndex = imageIndex;
|
|
181
|
+
}
|
|
182
|
+
else {
|
|
183
|
+
newIndex = imageIndex + (distance < 0 ? 1 : -1);
|
|
184
|
+
}
|
|
185
|
+
this.animateToIndex(imageIndex, newIndex, distance, actualSwipes?.length ?? 1);
|
|
205
186
|
}
|
|
206
187
|
animateToIndex(oldIndex, newIndex, distance, totalSlides) {
|
|
207
|
-
const
|
|
188
|
+
const animation = this.animation();
|
|
189
|
+
const orientation = this.orientation();
|
|
208
190
|
const containerElement = this.containerElement.nativeElement;
|
|
209
|
-
const
|
|
191
|
+
const maxSlideHeight = this.maxSlideHeight();
|
|
192
|
+
// For vertical mode, use maxSlideHeight instead of container height
|
|
193
|
+
const containerLength = orientation === 'horizontal'
|
|
194
|
+
? containerElement.clientWidth
|
|
195
|
+
: maxSlideHeight;
|
|
196
|
+
this.animationStart.emit();
|
|
197
|
+
// Handle 'none' animation mode - instant transition
|
|
198
|
+
if (animation === 'none') {
|
|
199
|
+
// Correct the image index immediately
|
|
200
|
+
if (newIndex === -1) {
|
|
201
|
+
this.imageIndex.set(totalSlides - 1);
|
|
202
|
+
}
|
|
203
|
+
else if (newIndex === totalSlides) {
|
|
204
|
+
this.imageIndex.set(0);
|
|
205
|
+
}
|
|
206
|
+
else {
|
|
207
|
+
this.imageIndex.set(newIndex);
|
|
208
|
+
}
|
|
209
|
+
this.startTouch.set(null);
|
|
210
|
+
this.lastTouch.set(null);
|
|
211
|
+
this.animationEnd.emit();
|
|
212
|
+
return;
|
|
213
|
+
}
|
|
214
|
+
// Set animating flag and clear host bindings so animation has full control
|
|
215
|
+
this.isAnimating.set(true);
|
|
216
|
+
if (orientation === 'horizontal') {
|
|
217
|
+
this.offsetLeft = null;
|
|
218
|
+
this.offsetRight = null;
|
|
219
|
+
}
|
|
220
|
+
else {
|
|
221
|
+
this.offsetTopPx = null;
|
|
222
|
+
this.offsetBottomPx = null;
|
|
223
|
+
}
|
|
210
224
|
if (orientation === 'horizontal') {
|
|
211
225
|
this.pendingAnimation = this.animationBuilder.build([
|
|
212
226
|
style({
|
|
@@ -234,18 +248,21 @@ class BsSwipeContainerDirective {
|
|
|
234
248
|
this.pendingAnimation.onDone(() => {
|
|
235
249
|
// Correct the image index
|
|
236
250
|
if (newIndex === -1) {
|
|
237
|
-
this.imageIndex
|
|
251
|
+
this.imageIndex.set(totalSlides - 1);
|
|
238
252
|
}
|
|
239
253
|
else if (newIndex === totalSlides) {
|
|
240
|
-
this.imageIndex
|
|
254
|
+
this.imageIndex.set(0);
|
|
241
255
|
}
|
|
242
256
|
else {
|
|
243
|
-
this.imageIndex
|
|
257
|
+
this.imageIndex.set(newIndex);
|
|
244
258
|
}
|
|
245
|
-
this.startTouch
|
|
246
|
-
this.lastTouch
|
|
259
|
+
this.startTouch.set(null);
|
|
260
|
+
this.lastTouch.set(null);
|
|
247
261
|
this.pendingAnimation?.destroy();
|
|
248
262
|
this.pendingAnimation = undefined;
|
|
263
|
+
// Clear animating flag so effects can update offsets again
|
|
264
|
+
this.isAnimating.set(false);
|
|
265
|
+
this.animationEnd.emit();
|
|
249
266
|
});
|
|
250
267
|
this.pendingAnimation.play();
|
|
251
268
|
}
|
|
@@ -264,76 +281,58 @@ class BsSwipeContainerDirective {
|
|
|
264
281
|
gotoAnimate(index, type) {
|
|
265
282
|
this.pendingAnimation?.finish();
|
|
266
283
|
setTimeout(() => {
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
this.animateToIndex(imageIndex, idx, 0, actualSwipes?.length ?? 1);
|
|
273
|
-
});
|
|
284
|
+
this.pendingAnimation?.finish();
|
|
285
|
+
const actualSwipes = this.actualSwipes();
|
|
286
|
+
const imageIndex = this.imageIndex();
|
|
287
|
+
const idx = (type === 'relative') ? imageIndex + index : index;
|
|
288
|
+
this.animateToIndex(imageIndex, idx, 0, actualSwipes?.length ?? 1);
|
|
274
289
|
}, 20);
|
|
275
290
|
}
|
|
276
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsSwipeContainerDirective, deps: [
|
|
277
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "
|
|
291
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsSwipeContainerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
292
|
+
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
293
|
}
|
|
279
294
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsSwipeContainerDirective, decorators: [{
|
|
280
295
|
type: Directive,
|
|
281
296
|
args: [{
|
|
282
297
|
selector: '[bsSwipeContainer]',
|
|
283
298
|
exportAs: 'bsSwipeContainer',
|
|
284
|
-
standalone:
|
|
299
|
+
standalone: true,
|
|
285
300
|
hostDirectives: [BsObserveSizeDirective],
|
|
286
301
|
}]
|
|
287
|
-
}], ctorParameters: () => [
|
|
288
|
-
type: Inject,
|
|
289
|
-
args: [DOCUMENT]
|
|
290
|
-
}] }, { type: i2.BsObserveSizeDirective }], propDecorators: { offsetLeft: [{
|
|
302
|
+
}], ctorParameters: () => [], propDecorators: { offsetLeft: [{
|
|
291
303
|
type: HostBinding,
|
|
292
304
|
args: ['style.margin-left.%']
|
|
293
305
|
}], offsetRight: [{
|
|
294
306
|
type: HostBinding,
|
|
295
307
|
args: ['style.margin-right.%']
|
|
296
|
-
}],
|
|
308
|
+
}], offsetTopPx: [{
|
|
297
309
|
type: HostBinding,
|
|
298
|
-
args: ['style.margin-top
|
|
299
|
-
}],
|
|
310
|
+
args: ['style.margin-top.px']
|
|
311
|
+
}], offsetBottomPx: [{
|
|
300
312
|
type: HostBinding,
|
|
301
|
-
args: ['style.margin-bottom
|
|
313
|
+
args: ['style.margin-bottom.px']
|
|
302
314
|
}], swipes: [{
|
|
303
315
|
type: ContentChildren,
|
|
304
316
|
args: [forwardRef(() => BsSwipeDirective)]
|
|
305
|
-
}], minimumOffset: [{
|
|
306
|
-
type: Input
|
|
307
|
-
}], orientation: [{
|
|
308
|
-
type: Input
|
|
309
|
-
}], imageIndex: [{
|
|
310
|
-
type: Input
|
|
311
|
-
}], imageIndexChange: [{
|
|
312
|
-
type: Output
|
|
313
|
-
}] } });
|
|
317
|
+
}], 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
318
|
|
|
315
319
|
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;
|
|
320
|
+
container = inject(BsSwipeContainerDirective);
|
|
321
|
+
observeSize = inject(BsObserveSizeDirective);
|
|
336
322
|
offside = input(false, ...(ngDevMode ? [{ debugName: "offside" }] : []));
|
|
323
|
+
orientationEffect = effect(() => {
|
|
324
|
+
const orientation = this.container.orientation();
|
|
325
|
+
this.inlineBlock = (orientation === 'horizontal');
|
|
326
|
+
this.block = (orientation === 'vertical');
|
|
327
|
+
}, ...(ngDevMode ? [{ debugName: "orientationEffect" }] : []));
|
|
328
|
+
heightEffect = effect(() => {
|
|
329
|
+
const maxHeight = this.container.maxSlideHeight();
|
|
330
|
+
const orientation = this.container.orientation();
|
|
331
|
+
// Only set height when we have valid measurements (> 10px threshold)
|
|
332
|
+
// to avoid circular dependency during initial load
|
|
333
|
+
const targetHeight = (orientation === 'vertical' && maxHeight > 10) ? maxHeight : null;
|
|
334
|
+
this.slideHeight = targetHeight;
|
|
335
|
+
}, ...(ngDevMode ? [{ debugName: "heightEffect" }] : []));
|
|
337
336
|
classes = true;
|
|
338
337
|
inlineBlock = true;
|
|
339
338
|
block = false;
|
|
@@ -341,16 +340,17 @@ class BsSwipeDirective {
|
|
|
341
340
|
onTouchStart(ev) {
|
|
342
341
|
if (ev.touches.length === 1) {
|
|
343
342
|
ev.preventDefault();
|
|
343
|
+
ev.stopPropagation();
|
|
344
344
|
this.container.pendingAnimation?.finish();
|
|
345
345
|
setTimeout(() => {
|
|
346
|
-
this.container.startTouch
|
|
346
|
+
this.container.startTouch.set({
|
|
347
347
|
position: {
|
|
348
348
|
x: ev.touches[0].clientX,
|
|
349
349
|
y: ev.touches[0].clientY,
|
|
350
350
|
},
|
|
351
351
|
timestamp: Date.now(),
|
|
352
352
|
});
|
|
353
|
-
this.container.lastTouch
|
|
353
|
+
this.container.lastTouch.set({
|
|
354
354
|
position: {
|
|
355
355
|
x: ev.touches[0].clientX,
|
|
356
356
|
y: ev.touches[0].clientY,
|
|
@@ -361,7 +361,9 @@ class BsSwipeDirective {
|
|
|
361
361
|
}
|
|
362
362
|
}
|
|
363
363
|
onTouchMove(ev) {
|
|
364
|
-
|
|
364
|
+
ev.preventDefault();
|
|
365
|
+
ev.stopPropagation();
|
|
366
|
+
this.container.lastTouch.set({
|
|
365
367
|
position: {
|
|
366
368
|
x: ev.touches[0].clientX,
|
|
367
369
|
y: ev.touches[0].clientY,
|
|
@@ -370,29 +372,28 @@ class BsSwipeDirective {
|
|
|
370
372
|
});
|
|
371
373
|
}
|
|
372
374
|
onTouchEnd(ev) {
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
});
|
|
375
|
+
ev.stopPropagation();
|
|
376
|
+
const startTouch = this.container.startTouch();
|
|
377
|
+
const lastTouch = this.container.lastTouch();
|
|
378
|
+
const orientation = this.container.orientation();
|
|
379
|
+
if (!!startTouch && !!lastTouch) {
|
|
380
|
+
const distance = (orientation === 'horizontal')
|
|
381
|
+
? lastTouch.position.x - startTouch.position.x
|
|
382
|
+
: lastTouch.position.y - startTouch.position.y;
|
|
383
|
+
this.container.onSwipe(distance);
|
|
384
|
+
}
|
|
384
385
|
}
|
|
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:
|
|
386
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsSwipeDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
387
|
+
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
388
|
}
|
|
388
389
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsSwipeDirective, decorators: [{
|
|
389
390
|
type: Directive,
|
|
390
391
|
args: [{
|
|
391
392
|
selector: '[bsSwipe]',
|
|
392
393
|
hostDirectives: [BsObserveSizeDirective],
|
|
393
|
-
standalone:
|
|
394
|
+
standalone: true,
|
|
394
395
|
}]
|
|
395
|
-
}],
|
|
396
|
+
}], propDecorators: { offside: [{ type: i0.Input, args: [{ isSignal: true, alias: "offside", required: false }] }], classes: [{
|
|
396
397
|
type: HostBinding,
|
|
397
398
|
args: ['class.align-top']
|
|
398
399
|
}, {
|
|
@@ -429,14 +430,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
429
430
|
|
|
430
431
|
class BsSwiperModule {
|
|
431
432
|
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
|
|
433
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.0.6", ngImport: i0, type: BsSwiperModule, imports: [BsSwipeDirective, BsSwipeContainerDirective], exports: [BsSwipeDirective, BsSwipeContainerDirective] });
|
|
434
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsSwiperModule });
|
|
434
435
|
}
|
|
435
436
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsSwiperModule, decorators: [{
|
|
436
437
|
type: NgModule,
|
|
437
438
|
args: [{
|
|
438
|
-
imports: [
|
|
439
|
-
declarations: [BsSwipeDirective, BsSwipeContainerDirective],
|
|
439
|
+
imports: [BsSwipeDirective, BsSwipeContainerDirective],
|
|
440
440
|
exports: [BsSwipeDirective, BsSwipeContainerDirective],
|
|
441
441
|
}]
|
|
442
442
|
}] });
|
|
@@ -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,QAAA,IAAI,CAAC,QAAQ,GAAa,QAAQ;AAClC,QAAA,IAAI,CAAC,OAAO,GAAG,aAAa,CAAC;AAC3B,YAAA,IAAI,CAAC,WAAW;AAChB,YAAA,IAAI,CAAC,UAAU;AACf,YAAA,IAAI,CAAC,WAAW;AAChB,YAAA,IAAI,CAA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ayer-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, 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 {\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 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 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 // 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 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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,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, ElementRef,
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { AfterViewInit, 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;
|
|
@@ -23,38 +38,36 @@ interface StartTouch {
|
|
|
23
38
|
|
|
24
39
|
declare class BsSwipeContainerDirective implements AfterViewInit {
|
|
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
|
-
startTouch
|
|
43
|
-
lastTouch
|
|
44
|
-
|
|
45
|
-
slideSizes$: Observable<(Size | undefined)[]>;
|
|
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
|
+
startTouch: _angular_core.WritableSignal<StartTouch | null>;
|
|
58
|
+
lastTouch: _angular_core.WritableSignal<LastTouch | null>;
|
|
59
|
+
_swipes: _angular_core.WritableSignal<QueryList<BsSwipeDirective> | null>;
|
|
49
60
|
pendingAnimation?: AnimationPlayer;
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
offsetPrimary
|
|
54
|
-
offsetSecondary
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
61
|
+
offset: _angular_core.Signal<number>;
|
|
62
|
+
padLeft: _angular_core.Signal<number>;
|
|
63
|
+
padRight: _angular_core.Signal<number>;
|
|
64
|
+
offsetPrimary: _angular_core.Signal<number>;
|
|
65
|
+
offsetSecondary: _angular_core.Signal<number>;
|
|
66
|
+
actualSwipes: _angular_core.Signal<BsSwipeDirective[]>;
|
|
67
|
+
private slideSizes;
|
|
68
|
+
maxSlideHeight: _angular_core.Signal<number>;
|
|
69
|
+
currentSlideHeight: _angular_core.Signal<number | null>;
|
|
70
|
+
constructor();
|
|
58
71
|
ngAfterViewInit(): void;
|
|
59
72
|
animateToIndexByDx(distance: number): void;
|
|
60
73
|
animateToIndex(oldIndex: number, newIndex: number, distance: number, totalSlides: number): void;
|
|
@@ -63,31 +76,14 @@ declare class BsSwipeContainerDirective implements AfterViewInit {
|
|
|
63
76
|
next(): void;
|
|
64
77
|
goto(index: number): void;
|
|
65
78
|
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: {}; }]>;
|
|
79
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BsSwipeContainerDirective, never>;
|
|
80
|
+
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
81
|
}
|
|
86
82
|
|
|
87
83
|
declare class BsSwiperModule {
|
|
88
|
-
static ɵfac:
|
|
89
|
-
static ɵmod:
|
|
90
|
-
static ɵinj:
|
|
84
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BsSwiperModule, never>;
|
|
85
|
+
static ɵmod: _angular_core.ɵɵNgModuleDeclaration<BsSwiperModule, never, [typeof BsSwipeDirective, typeof BsSwipeContainerDirective], [typeof BsSwipeDirective, typeof BsSwipeContainerDirective]>;
|
|
86
|
+
static ɵinj: _angular_core.ɵɵInjectorDeclaration<BsSwiperModule>;
|
|
91
87
|
}
|
|
92
88
|
|
|
93
89
|
export { BsSwipeContainerDirective, BsSwipeDirective, BsSwiperModule };
|