@mintplayer/ng-swiper 21.1.2 → 21.2.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.
@@ -1,16 +1,15 @@
1
1
  import { isPlatformServer } from '@angular/common';
2
2
  import * as i0 from '@angular/core';
3
- import { inject, ElementRef, PLATFORM_ID, NgZone, signal, computed, Directive } from '@angular/core';
3
+ import { inject, ElementRef, PLATFORM_ID, signal, computed, Directive } from '@angular/core';
4
4
 
5
5
  class BsObserveSizeDirective {
6
6
  element = inject(ElementRef);
7
7
  platformId = inject(PLATFORM_ID);
8
- zone = inject(NgZone);
9
8
  observer;
10
9
  constructor() {
11
10
  if (!isPlatformServer(this.platformId) && typeof ResizeObserver !== 'undefined') {
12
11
  this.observer = new ResizeObserver((entries) => {
13
- this.zone.run(() => this.size.set(entries[0].contentRect));
12
+ this.size.set(entries[0].contentRect);
14
13
  });
15
14
  }
16
15
  }
@@ -28,14 +27,13 @@ class BsObserveSizeDirective {
28
27
  this.observer.disconnect();
29
28
  }
30
29
  }
31
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsObserveSizeDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
32
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.0.6", type: BsObserveSizeDirective, isStandalone: true, selector: "[bsObserveSize]", exportAs: ["bsObserveSize"], ngImport: i0 });
30
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: BsObserveSizeDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
31
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.1.6", type: BsObserveSizeDirective, isStandalone: true, selector: "[bsObserveSize]", exportAs: ["bsObserveSize"], ngImport: i0 });
33
32
  }
34
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsObserveSizeDirective, decorators: [{
33
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: BsObserveSizeDirective, decorators: [{
35
34
  type: Directive,
36
35
  args: [{
37
36
  selector: '[bsObserveSize]',
38
- standalone: true,
39
37
  exportAs: 'bsObserveSize'
40
38
  }]
41
39
  }], ctorParameters: () => [] });
@@ -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, 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":[],"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,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
+ {"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';\nimport { AfterViewInit, computed, Directive, ElementRef, inject, OnDestroy, PLATFORM_ID, signal } from '@angular/core';\nimport { Size } from './size';\n\n@Directive({\n selector: '[bsObserveSize]',\n exportAs: 'bsObserveSize'\n})\nexport class BsObserveSizeDirective implements AfterViewInit, OnDestroy {\n private element = inject(ElementRef);\n private platformId = inject(PLATFORM_ID);\n\n private observer?: ResizeObserver;\n\n constructor() {\n if (!isPlatformServer(this.platformId) && typeof ResizeObserver !== 'undefined') {\n this.observer = new ResizeObserver((entries) => {\n this.size.set(entries[0].contentRect);\n });\n }\n }\n\n size = signal<Size | undefined>(undefined);\n width = computed(() => this.size()?.width);\n height = computed(() => this.size()?.height);\n\n ngAfterViewInit() {\n const el: HTMLElement = this.element.nativeElement;\n this.observer?.observe(el);\n this.size.set({ width: el.clientWidth, height: el.clientHeight });\n }\n\n ngOnDestroy() {\n if (this.observer) {\n this.observer.unobserve(this.element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AAC,UAAU,EAAE;QAC5B;IACF;uGA7BW,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;kBAJlC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,iBAAiB;AAC3B,oBAAA,QAAQ,EAAE;AACX,iBAAA;;;ACPD;;AAEG;;;;"}
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, ElementRef, input, model, output, signal, computed, effect, forwardRef, ContentChildren, HostBinding, Directive, HostListener, NgModule } from '@angular/core';
2
+ import { inject, ElementRef, contentChildren, input, model, output, signal, computed, effect, Directive, DestroyRef, afterNextRender } from '@angular/core';
3
3
  import * as i1 from '@mintplayer/ng-swiper/observe-size';
4
4
  import { BsObserveSizeDirective } from '@mintplayer/ng-swiper/observe-size';
5
5
  import { DOCUMENT } from '@angular/common';
@@ -14,9 +14,7 @@ class BsSwipeContainerDirective {
14
14
  offsetRight = null;
15
15
  offsetTopPx = null;
16
16
  offsetBottomPx = null;
17
- set swipes(value) {
18
- setTimeout(() => this._swipes.set(value));
19
- }
17
+ swipes = contentChildren(BsSwipeDirective, ...(ngDevMode ? [{ debugName: "swipes" }] : []));
20
18
  minimumOffset = input(50, ...(ngDevMode ? [{ debugName: "minimumOffset" }] : []));
21
19
  animation = input('slide', ...(ngDevMode ? [{ debugName: "animation" }] : []));
22
20
  orientation = input('horizontal', ...(ngDevMode ? [{ debugName: "orientation" }] : []));
@@ -28,7 +26,6 @@ class BsSwipeContainerDirective {
28
26
  isDestroyed = false;
29
27
  startTouch = signal(null, ...(ngDevMode ? [{ debugName: "startTouch" }] : []));
30
28
  lastTouch = signal(null, ...(ngDevMode ? [{ debugName: "lastTouch" }] : []));
31
- _swipes = signal(null, ...(ngDevMode ? [{ debugName: "_swipes" }] : []));
32
29
  pendingAnimation;
33
30
  // Computed signals for derived state
34
31
  offset = computed(() => {
@@ -61,9 +58,9 @@ class BsSwipeContainerDirective {
61
58
  }
62
59
  }, ...(ngDevMode ? [{ debugName: "offset" }] : []));
63
60
  padLeft = computed(() => {
64
- const swipes = this._swipes();
65
- if (!swipes)
66
- return 0;
61
+ const swipes = this.swipes();
62
+ if (swipes.length === 0)
63
+ return 1; // Default to 1 to prevent container collapse before swipes are loaded
67
64
  let count = 0;
68
65
  for (const s of swipes) {
69
66
  if (!s.offside()) {
@@ -76,11 +73,11 @@ class BsSwipeContainerDirective {
76
73
  return count;
77
74
  }, ...(ngDevMode ? [{ debugName: "padLeft" }] : []));
78
75
  padRight = computed(() => {
79
- const swipes = this._swipes();
80
- if (!swipes)
81
- return 0;
76
+ const swipes = this.swipes();
77
+ if (swipes.length === 0)
78
+ return 1; // Default to 1 to prevent container collapse before swipes are loaded
82
79
  let count = 0;
83
- for (const s of swipes.toArray().reverse()) {
80
+ for (const s of [...swipes].reverse()) {
84
81
  if (!s.offside()) {
85
82
  break;
86
83
  }
@@ -93,13 +90,8 @@ class BsSwipeContainerDirective {
93
90
  offsetPrimary = computed(() => this.offset() - this.padLeft() * 100, ...(ngDevMode ? [{ debugName: "offsetPrimary" }] : []));
94
91
  offsetSecondary = computed(() => -(this.offset() - this.padLeft() * 100) - (this.padRight() - 1) * 100, ...(ngDevMode ? [{ debugName: "offsetSecondary" }] : []));
95
92
  actualSwipes = computed(() => {
96
- const swipes = this._swipes();
97
- if (swipes) {
98
- return swipes.filter(swipe => !swipe.offside());
99
- }
100
- else {
101
- return [];
102
- }
93
+ const swipes = this.swipes();
94
+ return swipes.filter(swipe => !swipe.offside());
103
95
  }, ...(ngDevMode ? [{ debugName: "actualSwipes" }] : []));
104
96
  // Computed signal that reactively tracks all swipe sizes
105
97
  slideSizes = computed(() => {
@@ -297,36 +289,28 @@ class BsSwipeContainerDirective {
297
289
  this.animateToIndex(imageIndex, idx, 0, actualSwipes?.length ?? 1);
298
290
  }, 20);
299
291
  }
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 });
292
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: BsSwipeContainerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
293
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "21.1.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.%": "offsetLeft", "style.margin-right.%": "offsetRight", "style.margin-top.px": "offsetTopPx", "style.margin-bottom.px": "offsetBottomPx" } }, queries: [{ propertyName: "swipes", predicate: BsSwipeDirective, isSignal: true }], exportAs: ["bsSwipeContainer"], hostDirectives: [{ directive: i1.BsObserveSizeDirective }], ngImport: i0 });
302
294
  }
303
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsSwipeContainerDirective, decorators: [{
295
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: BsSwipeContainerDirective, decorators: [{
304
296
  type: Directive,
305
297
  args: [{
306
298
  selector: '[bsSwipeContainer]',
307
299
  exportAs: 'bsSwipeContainer',
308
- standalone: true,
309
300
  hostDirectives: [BsObserveSizeDirective],
301
+ host: {
302
+ '[style.margin-left.%]': 'offsetLeft',
303
+ '[style.margin-right.%]': 'offsetRight',
304
+ '[style.margin-top.px]': 'offsetTopPx',
305
+ '[style.margin-bottom.px]': 'offsetBottomPx',
306
+ },
310
307
  }]
311
- }], ctorParameters: () => [], propDecorators: { offsetLeft: [{
312
- type: HostBinding,
313
- args: ['style.margin-left.%']
314
- }], offsetRight: [{
315
- type: HostBinding,
316
- args: ['style.margin-right.%']
317
- }], offsetTopPx: [{
318
- type: HostBinding,
319
- args: ['style.margin-top.px']
320
- }], offsetBottomPx: [{
321
- type: HostBinding,
322
- args: ['style.margin-bottom.px']
323
- }], swipes: [{
324
- type: ContentChildren,
325
- args: [forwardRef(() => BsSwipeDirective)]
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"] }] } });
308
+ }], ctorParameters: () => [], propDecorators: { swipes: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => BsSwipeDirective), { isSignal: true }] }], 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"] }] } });
327
309
 
328
310
  class BsSwipeDirective {
329
311
  container = inject(BsSwipeContainerDirective);
312
+ el = inject((ElementRef));
313
+ destroyRef = inject(DestroyRef);
330
314
  observeSize = inject(BsObserveSizeDirective);
331
315
  offside = input(false, ...(ngDevMode ? [{ debugName: "offside" }] : []));
332
316
  // Track if we've detected a swipe (vs a tap)
@@ -349,11 +333,30 @@ class BsSwipeDirective {
349
333
  const targetHeight = (orientation === 'vertical' && maxHeight > 10) ? maxHeight : null;
350
334
  this.slideHeight = targetHeight;
351
335
  }, ...(ngDevMode ? [{ debugName: "heightEffect" }] : []));
352
- classes = true;
353
336
  inlineBlock = true;
354
337
  block = false;
355
338
  slideHeight = null;
356
339
  touchAction = 'pan-y';
340
+ constructor() {
341
+ // Register touch listeners manually with { passive: false } for touchmove/touchend.
342
+ // Angular's host event bindings register passive listeners by default for touch events,
343
+ // which silently ignores preventDefault(). This caused Firefox Android's PullToRefresh
344
+ // to trigger because the browser's default action was never actually cancelled.
345
+ afterNextRender(() => {
346
+ const elem = this.el.nativeElement;
347
+ const onTouchStart = (ev) => this.onTouchStart(ev);
348
+ const onTouchMove = (ev) => this.onTouchMove(ev);
349
+ const onTouchEnd = (ev) => this.onTouchEnd(ev);
350
+ elem.addEventListener('touchstart', onTouchStart, { passive: true });
351
+ elem.addEventListener('touchmove', onTouchMove, { passive: false });
352
+ elem.addEventListener('touchend', onTouchEnd, { passive: false });
353
+ this.destroyRef.onDestroy(() => {
354
+ elem.removeEventListener('touchstart', onTouchStart);
355
+ elem.removeEventListener('touchmove', onTouchMove);
356
+ elem.removeEventListener('touchend', onTouchEnd);
357
+ });
358
+ });
359
+ }
357
360
  onTouchStart(ev) {
358
361
  if (ev.touches.length === 1) {
359
362
  ev.stopPropagation(); // Prevent bubbling, but allow clicks
@@ -412,70 +415,31 @@ class BsSwipeDirective {
412
415
  this.container.onSwipe(distance);
413
416
  }
414
417
  }
415
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsSwipeDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
416
- 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", "style.touch-action": "this.touchAction" } }, hostDirectives: [{ directive: i1.BsObserveSizeDirective }], ngImport: i0 });
418
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: BsSwipeDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
419
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.1.6", type: BsSwipeDirective, isStandalone: true, selector: "[bsSwipe]", inputs: { offside: { classPropertyName: "offside", publicName: "offside", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.align-top": "true", "class.float-none": "true", "class.w-100": "true", "class.pe-auto": "true", "class.me-0": "true", "class.d-inline-block": "inlineBlock", "class.d-block": "block", "style.height.px": "slideHeight", "style.touch-action": "touchAction" } }, hostDirectives: [{ directive: i1.BsObserveSizeDirective }], ngImport: i0 });
417
420
  }
418
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsSwipeDirective, decorators: [{
421
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.6", ngImport: i0, type: BsSwipeDirective, decorators: [{
419
422
  type: Directive,
420
423
  args: [{
421
424
  selector: '[bsSwipe]',
422
425
  hostDirectives: [BsObserveSizeDirective],
423
- standalone: true,
424
- }]
425
- }], propDecorators: { offside: [{ type: i0.Input, args: [{ isSignal: true, alias: "offside", required: false }] }], classes: [{
426
- type: HostBinding,
427
- args: ['class.align-top']
428
- }, {
429
- type: HostBinding,
430
- args: ['class.float-none']
431
- }, {
432
- type: HostBinding,
433
- args: ['class.w-100']
434
- }, {
435
- type: HostBinding,
436
- args: ['class.pe-auto']
437
- }, {
438
- type: HostBinding,
439
- args: ['class.me-0']
440
- }], inlineBlock: [{
441
- type: HostBinding,
442
- args: ['class.d-inline-block']
443
- }], block: [{
444
- type: HostBinding,
445
- args: ['class.d-block']
446
- }], slideHeight: [{
447
- type: HostBinding,
448
- args: ['style.height.px']
449
- }], touchAction: [{
450
- type: HostBinding,
451
- args: ['style.touch-action']
452
- }], onTouchStart: [{
453
- type: HostListener,
454
- args: ['touchstart', ['$event']]
455
- }], onTouchMove: [{
456
- type: HostListener,
457
- args: ['touchmove', ['$event']]
458
- }], onTouchEnd: [{
459
- type: HostListener,
460
- args: ['touchend', ['$event']]
461
- }] } });
462
-
463
- class BsSwiperModule {
464
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsSwiperModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
465
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.0.6", ngImport: i0, type: BsSwiperModule, imports: [BsSwipeDirective, BsSwipeContainerDirective], exports: [BsSwipeDirective, BsSwipeContainerDirective] });
466
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsSwiperModule });
467
- }
468
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsSwiperModule, decorators: [{
469
- type: NgModule,
470
- args: [{
471
- imports: [BsSwipeDirective, BsSwipeContainerDirective],
472
- exports: [BsSwipeDirective, BsSwipeContainerDirective],
426
+ host: {
427
+ '[class.align-top]': 'true',
428
+ '[class.float-none]': 'true',
429
+ '[class.w-100]': 'true',
430
+ '[class.pe-auto]': 'true',
431
+ '[class.me-0]': 'true',
432
+ '[class.d-inline-block]': 'inlineBlock',
433
+ '[class.d-block]': 'block',
434
+ '[style.height.px]': 'slideHeight',
435
+ '[style.touch-action]': 'touchAction',
436
+ },
473
437
  }]
474
- }] });
438
+ }], ctorParameters: () => [], propDecorators: { offside: [{ type: i0.Input, args: [{ isSignal: true, alias: "offside", required: false }] }] } });
475
439
 
476
440
  /**
477
441
  * Generated bundle index. Do not edit.
478
442
  */
479
443
 
480
- export { BsSwipeContainerDirective, BsSwipeDirective, BsSwiperModule };
444
+ export { BsSwipeContainerDirective, BsSwipeDirective };
481
445
  //# sourceMappingURL=mintplayer-ng-swiper-swiper.mjs.map
@@ -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 { 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 // Track if we've detected a swipe (vs a tap)\n private isSwipeDetected = false;\n private readonly SWIPE_THRESHOLD = 10; // pixels\n\n private orientationEffect = effect(() => {\n const orientation = this.container.orientation();\n this.inlineBlock = (orientation === 'horizontal');\n this.block = (orientation === 'vertical');\n // Tell browser which axis we handle, allowing scroll on the other axis\n // pan-y = allow vertical scroll, we handle horizontal swipes\n // pan-x = allow horizontal scroll, we handle vertical swipes\n this.touchAction = (orientation === 'horizontal') ? 'pan-y' : 'pan-x';\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 @HostBinding('style.touch-action') touchAction: 'pan-x' | 'pan-y' = 'pan-y';\n\n @HostListener('touchstart', ['$event'])\n onTouchStart(ev: TouchEvent) {\n if (ev.touches.length === 1) {\n ev.stopPropagation(); // Prevent bubbling, but allow clicks\n this.isSwipeDetected = false;\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.stopPropagation();\n\n // Only prevent default (page scroll) if movement exceeds threshold\n const startTouch = this.container.startTouch();\n if (startTouch) {\n const dx = Math.abs(ev.touches[0].clientX - startTouch.position.x);\n const dy = Math.abs(ev.touches[0].clientY - startTouch.position.y);\n if (dx > this.SWIPE_THRESHOLD || dy > this.SWIPE_THRESHOLD) {\n this.isSwipeDetected = true;\n ev.preventDefault(); // Now we're swiping, prevent scroll\n }\n }\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 }\n\n @HostListener('touchend', ['$event'])\n onTouchEnd(ev: TouchEvent) {\n ev.stopPropagation();\n if (this.isSwipeDetected) {\n ev.preventDefault();\n }\n\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,C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;uBAAC,aAAa;;sBACzB,WAAW;uBAAC,eAAe;;sBAC3B,WAAW;uBAAC,YAAY;;sBAGxB,WAAW;uBAAC,sBAAsB;;sBAClC,WAAW;uBAAC,eAAe;;sBAC3B,WAAW;uBAAC,iBAAiB;;sBAC7B,WAAW;uBAAC,oBAAoB;;sBAEhC,YAAY;uBAAC,YAAY,EAAE,CAAC,QAAQ,CAAC;;sBA0BrC,YAAY;uBAAC,WAAW,EAAE,CAAC,QAAQ,CAAC;;sBAwBpC,YAAY;uBAAC,UAAU,EAAE,CAAC,QAAQ,CAAC;;;MC5FzB,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;;;;"}
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/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, inject, input, model, OnDestroy, output, 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 hostDirectives: [BsObserveSizeDirective],\n host: {\n '[style.margin-left.%]': 'offsetLeft',\n '[style.margin-right.%]': 'offsetRight',\n '[style.margin-top.px]': 'offsetTopPx',\n '[style.margin-bottom.px]': 'offsetBottomPx',\n },\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 offsetLeft: number | null = null;\n offsetRight: number | null = null;\n offsetTopPx: number | null = null;\n offsetBottomPx: number | null = null;\n\n readonly swipes = contentChildren(BsSwipeDirective);\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 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.length === 0) return 1; // Default to 1 to prevent container collapse before swipes are loaded\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.length === 0) return 1; // Default to 1 to prevent container collapse before swipes are loaded\n\n let count = 0;\n for (const s of [...swipes].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 return swipes.filter(swipe => !swipe.offside());\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 { afterNextRender, DestroyRef, Directive, effect, ElementRef, 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 host: {\n '[class.align-top]': 'true',\n '[class.float-none]': 'true',\n '[class.w-100]': 'true',\n '[class.pe-auto]': 'true',\n '[class.me-0]': 'true',\n '[class.d-inline-block]': 'inlineBlock',\n '[class.d-block]': 'block',\n '[style.height.px]': 'slideHeight',\n '[style.touch-action]': 'touchAction',\n },\n})\nexport class BsSwipeDirective {\n private container = inject(BsSwipeContainerDirective);\n private el = inject(ElementRef<HTMLElement>);\n private destroyRef = inject(DestroyRef);\n observeSize = inject(BsObserveSizeDirective);\n\n public offside = input(false);\n\n // Track if we've detected a swipe (vs a tap)\n private isSwipeDetected = false;\n private readonly SWIPE_THRESHOLD = 10; // pixels\n\n private orientationEffect = effect(() => {\n const orientation = this.container.orientation();\n this.inlineBlock = (orientation === 'horizontal');\n this.block = (orientation === 'vertical');\n // Tell browser which axis we handle, allowing scroll on the other axis\n // pan-y = allow vertical scroll, we handle horizontal swipes\n // pan-x = allow horizontal scroll, we handle vertical swipes\n this.touchAction = (orientation === 'horizontal') ? 'pan-y' : 'pan-x';\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 inlineBlock = true;\n block = false;\n slideHeight: number | null = null;\n touchAction: 'pan-x' | 'pan-y' = 'pan-y';\n\n constructor() {\n // Register touch listeners manually with { passive: false } for touchmove/touchend.\n // Angular's host event bindings register passive listeners by default for touch events,\n // which silently ignores preventDefault(). This caused Firefox Android's PullToRefresh\n // to trigger because the browser's default action was never actually cancelled.\n afterNextRender(() => {\n const elem = this.el.nativeElement;\n const onTouchStart = (ev: TouchEvent) => this.onTouchStart(ev);\n const onTouchMove = (ev: TouchEvent) => this.onTouchMove(ev);\n const onTouchEnd = (ev: TouchEvent) => this.onTouchEnd(ev);\n\n elem.addEventListener('touchstart', onTouchStart, { passive: true });\n elem.addEventListener('touchmove', onTouchMove, { passive: false });\n elem.addEventListener('touchend', onTouchEnd, { passive: false });\n\n this.destroyRef.onDestroy(() => {\n elem.removeEventListener('touchstart', onTouchStart);\n elem.removeEventListener('touchmove', onTouchMove);\n elem.removeEventListener('touchend', onTouchEnd);\n });\n });\n }\n\n onTouchStart(ev: TouchEvent) {\n if (ev.touches.length === 1) {\n ev.stopPropagation(); // Prevent bubbling, but allow clicks\n this.isSwipeDetected = false;\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 onTouchMove(ev: TouchEvent) {\n ev.stopPropagation();\n\n // Only prevent default (page scroll) if movement exceeds threshold\n const startTouch = this.container.startTouch();\n if (startTouch) {\n const dx = Math.abs(ev.touches[0].clientX - startTouch.position.x);\n const dy = Math.abs(ev.touches[0].clientY - startTouch.position.y);\n if (dx > this.SWIPE_THRESHOLD || dy > this.SWIPE_THRESHOLD) {\n this.isSwipeDetected = true;\n ev.preventDefault(); // Now we're swiping, prevent scroll\n }\n }\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 }\n\n onTouchEnd(ev: TouchEvent) {\n ev.stopPropagation();\n if (this.isSwipeDetected) {\n ev.preventDefault();\n }\n\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","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MAmBa,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;IAEvC,UAAU,GAAkB,IAAI;IAChC,WAAW,GAAkB,IAAI;IACjC,WAAW,GAAkB,IAAI;IACjC,cAAc,GAAkB,IAAI;AAE3B,IAAA,MAAM,GAAG,eAAe,CAAC,gBAAgB,kDAAC;AAEnD,IAAA,aAAa,GAAG,KAAK,CAAC,EAAE,yDAAC;AACzB,IAAA,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AA,EAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,kBAAA,EAAA,MAAA,EAAA,aAAA,EAAA,MAAA,EAAA,eAAA,EAAA,MAAA,EAAA,YAAA,EAAA,MAAA,EAAA,sBAAA,EAAA,aAAA,EAAA,eAAA,EAAA,OAAA,EAAA,iBAAA,EAAA,aAAA,EAAA,oBAAA,EAAA,aAAA,EAAA,EAAA,EAAA,cAAA,EAAA,CAAA,EAAA,SAAA,EAAA,EAAA,CAAA,sBAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAhB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAf5B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,WAAW;oBACrB,cAAc,EAAE,CAAC,sBAAsB,CAAC;AACxC,oBAAA,IAAI,EAAE;AACJ,wBAAA,mBAAmB,EAAE,MAAM;AAC3B,wBAAA,oBAAoB,EAAE,MAAM;AAC5B,wBAAA,eAAe,EAAE,MAAM;AACvB,wBAAA,iBAAiB,EAAE,MAAM;AACzB,wBAAA,cAAc,EAAE,MAAM;AACtB,wBAAA,wBAAwB,EAAE,aAAa;AACvC,wBAAA,iBAAiB,EAAE,OAAO;AAC1B,wBAAA,mBAAmB,EAAE,aAAa;AAClC,wBAAA,sBAAsB,EAAE,aAAa;AACtC,qBAAA;AACF,iBAAA;;;AClBD;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mintplayer/ng-swiper",
3
3
  "private": false,
4
- "version": "21.1.2",
4
+ "version": "21.2.0",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/MintPlayer/mintplayer-ng-bootstrap",
@@ -11,8 +11,7 @@
11
11
  "@angular/common": "^21.0.0",
12
12
  "@angular/core": "^21.0.0",
13
13
  "@angular/animations": "^21.0.0",
14
- "@angular/platform-browser": "^21.0.0",
15
- "rxjs": "^7.5.0"
14
+ "@angular/platform-browser": "^21.0.0"
16
15
  },
17
16
  "dependencies": {
18
17
  "tslib": "^2.3.0"
@@ -9,7 +9,6 @@ interface Size {
9
9
  declare class BsObserveSizeDirective implements AfterViewInit, OnDestroy {
10
10
  private element;
11
11
  private platformId;
12
- private zone;
13
12
  private observer?;
14
13
  constructor();
15
14
  size: _angular_core.WritableSignal<Size | undefined>;
@@ -1,22 +1,24 @@
1
1
  import * as _angular_core from '@angular/core';
2
- import { AfterViewInit, OnDestroy, ElementRef, QueryList } from '@angular/core';
2
+ import { AfterViewInit, OnDestroy, ElementRef } from '@angular/core';
3
3
  import * as i1 from '@mintplayer/ng-swiper/observe-size';
4
4
  import { BsObserveSizeDirective } from '@mintplayer/ng-swiper/observe-size';
5
5
  import { AnimationPlayer } from '@angular/animations';
6
6
 
7
7
  declare class BsSwipeDirective {
8
8
  private container;
9
+ private el;
10
+ private destroyRef;
9
11
  observeSize: BsObserveSizeDirective;
10
12
  offside: _angular_core.InputSignal<boolean>;
11
13
  private isSwipeDetected;
12
14
  private readonly SWIPE_THRESHOLD;
13
15
  private orientationEffect;
14
16
  private heightEffect;
15
- classes: boolean;
16
17
  inlineBlock: boolean;
17
18
  block: boolean;
18
19
  slideHeight: number | null;
19
20
  touchAction: 'pan-x' | 'pan-y';
21
+ constructor();
20
22
  onTouchStart(ev: TouchEvent): void;
21
23
  onTouchMove(ev: TouchEvent): void;
22
24
  onTouchEnd(ev: TouchEvent): void;
@@ -48,7 +50,7 @@ declare class BsSwipeContainerDirective implements AfterViewInit, OnDestroy {
48
50
  offsetRight: number | null;
49
51
  offsetTopPx: number | null;
50
52
  offsetBottomPx: number | null;
51
- set swipes(value: QueryList<BsSwipeDirective>);
53
+ readonly swipes: _angular_core.Signal<readonly BsSwipeDirective[]>;
52
54
  minimumOffset: _angular_core.InputSignal<number>;
53
55
  animation: _angular_core.InputSignal<"slide" | "fade" | "none">;
54
56
  orientation: _angular_core.InputSignal<"horizontal" | "vertical">;
@@ -60,7 +62,6 @@ declare class BsSwipeContainerDirective implements AfterViewInit, OnDestroy {
60
62
  private isDestroyed;
61
63
  startTouch: _angular_core.WritableSignal<StartTouch | null>;
62
64
  lastTouch: _angular_core.WritableSignal<LastTouch | null>;
63
- _swipes: _angular_core.WritableSignal<QueryList<BsSwipeDirective> | null>;
64
65
  pendingAnimation?: AnimationPlayer;
65
66
  offset: _angular_core.Signal<number>;
66
67
  padLeft: _angular_core.Signal<number>;
@@ -85,11 +86,5 @@ declare class BsSwipeContainerDirective implements AfterViewInit, OnDestroy {
85
86
  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: {}; }]>;
86
87
  }
87
88
 
88
- declare class BsSwiperModule {
89
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<BsSwiperModule, never>;
90
- static ɵmod: _angular_core.ɵɵNgModuleDeclaration<BsSwiperModule, never, [typeof BsSwipeDirective, typeof BsSwipeContainerDirective], [typeof BsSwipeDirective, typeof BsSwipeContainerDirective]>;
91
- static ɵinj: _angular_core.ɵɵInjectorDeclaration<BsSwiperModule>;
92
- }
93
-
94
- export { BsSwipeContainerDirective, BsSwipeDirective, BsSwiperModule };
89
+ export { BsSwipeContainerDirective, BsSwipeDirective };
95
90
  export type { LastTouch, Point, StartTouch };