@taiga-ui/addon-mobile 4.52.0-canary.65c65f9 → 4.52.0-canary.692273c

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.
Files changed (28) hide show
  1. package/components/sheet-dialog/sheet-dialog.options.d.ts +1 -1
  2. package/directives/dropdown-mobile/dropdown-mobile-wrapper.component.d.ts +20 -0
  3. package/directives/dropdown-mobile/dropdown-mobile.component.d.ts +5 -15
  4. package/directives/index.d.ts +0 -1
  5. package/directives/ripple/ripple.directive.d.ts +1 -1
  6. package/fesm2022/taiga-ui-addon-mobile-components-bottom-sheet.mjs +1 -1
  7. package/fesm2022/taiga-ui-addon-mobile-components-bottom-sheet.mjs.map +1 -1
  8. package/fesm2022/taiga-ui-addon-mobile-components-pull-to-refresh.mjs +1 -1
  9. package/fesm2022/taiga-ui-addon-mobile-components-pull-to-refresh.mjs.map +1 -1
  10. package/fesm2022/taiga-ui-addon-mobile-components-sheet-dialog.mjs +13 -13
  11. package/fesm2022/taiga-ui-addon-mobile-components-sheet-dialog.mjs.map +1 -1
  12. package/fesm2022/taiga-ui-addon-mobile-directives-dropdown-mobile.mjs +106 -86
  13. package/fesm2022/taiga-ui-addon-mobile-directives-dropdown-mobile.mjs.map +1 -1
  14. package/fesm2022/taiga-ui-addon-mobile-directives-ripple.mjs +14 -35
  15. package/fesm2022/taiga-ui-addon-mobile-directives-ripple.mjs.map +1 -1
  16. package/fesm2022/taiga-ui-addon-mobile-directives.mjs +0 -1
  17. package/fesm2022/taiga-ui-addon-mobile-directives.mjs.map +1 -1
  18. package/fesm2022/taiga-ui-addon-mobile-services.mjs +2 -2
  19. package/fesm2022/taiga-ui-addon-mobile-services.mjs.map +1 -1
  20. package/package.json +2 -6
  21. package/styles/common/toast.less +21 -0
  22. package/styles/taiga-ui-mobile.less +8 -0
  23. package/directives/sidebar/index.d.ts +0 -3
  24. package/directives/sidebar/sidebar.component.d.ts +0 -21
  25. package/directives/sidebar/sidebar.d.ts +0 -6
  26. package/directives/sidebar/sidebar.directive.d.ts +0 -22
  27. package/fesm2022/taiga-ui-addon-mobile-directives-sidebar.mjs +0 -114
  28. package/fesm2022/taiga-ui-addon-mobile-directives-sidebar.mjs.map +0 -1
@@ -4,7 +4,7 @@ import { type PolymorpheusContent } from '@taiga-ui/polymorpheus';
4
4
  import { type Observable } from 'rxjs';
5
5
  export interface TuiSheetDialogOptions<I = undefined> {
6
6
  readonly appearance: string;
7
- readonly closeable: Observable<boolean> | boolean;
7
+ readonly closable: Observable<boolean> | boolean;
8
8
  readonly data: I;
9
9
  readonly initial: number;
10
10
  readonly label: PolymorpheusContent<TuiPopover<TuiSheetDialogOptions<I>, any>>;
@@ -0,0 +1,20 @@
1
+ import { DestroyRef, type OnInit } from '@angular/core';
2
+ import { TuiSheetDialogService } from '@taiga-ui/addon-mobile/components/sheet-dialog';
3
+ import { TuiDropdownDirective } from '@taiga-ui/core/directives/dropdown';
4
+ import { TuiDropdownMobile } from './dropdown-mobile.directive';
5
+ import * as i0 from "@angular/core";
6
+ import * as i1 from "@taiga-ui/cdk/directives/active-zone";
7
+ import * as i2 from "@taiga-ui/cdk/directives/animated";
8
+ export declare class TuiDropdownMobileWrapperComponent implements OnInit {
9
+ private readonly content?;
10
+ protected readonly destroyRef: DestroyRef;
11
+ protected readonly dialogs: TuiSheetDialogService;
12
+ protected readonly directive: TuiDropdownMobile;
13
+ protected readonly dropdown: TuiDropdownDirective;
14
+ protected readonly context: {
15
+ $implicit: () => void;
16
+ };
17
+ ngOnInit(): void;
18
+ static ɵfac: i0.ɵɵFactoryDeclaration<TuiDropdownMobileWrapperComponent, never>;
19
+ static ɵcmp: i0.ɵɵComponentDeclaration<TuiDropdownMobileWrapperComponent, "ng-component", never, {}, {}, never, never, true, [{ directive: typeof i1.TuiActiveZone; inputs: {}; outputs: {}; }, { directive: typeof i2.TuiAnimated; inputs: {}; outputs: {}; }]>;
20
+ }
@@ -1,27 +1,17 @@
1
- import { type AfterViewInit, type OnDestroy } from '@angular/core';
2
- import { type TuiSwipeEvent } from '@taiga-ui/cdk/directives/swipe';
3
- import { TuiDropdownDirective } from '@taiga-ui/core/directives/dropdown';
4
- import { TuiDropdownMobile } from './dropdown-mobile.directive';
1
+ import { type OnDestroy } from '@angular/core';
5
2
  import * as i0 from "@angular/core";
6
- import * as i1 from "@taiga-ui/cdk/directives/active-zone";
7
- import * as i2 from "@taiga-ui/cdk/directives/animated";
8
- export declare class TuiDropdownMobileComponent implements OnDestroy, AfterViewInit {
3
+ export declare class TuiDropdownMobileComponent implements OnDestroy {
9
4
  private readonly el;
10
5
  private readonly keyboard;
11
6
  private readonly doc;
12
7
  private readonly scrollTop;
8
+ private readonly dropdown;
13
9
  private readonly observer;
14
- protected readonly directive: TuiDropdownMobile;
15
- protected readonly dropdown: TuiDropdownDirective;
16
10
  constructor();
17
- ngAfterViewInit(): void;
18
11
  ngOnDestroy(): void;
19
- protected readonly close: () => void;
20
12
  protected onClick(event: MouseEvent): void;
21
- protected onSwipe({ direction }: TuiSwipeEvent, el: HTMLElement): void;
22
- protected onIntersection({ isIntersecting }: IntersectionObserverEntry): void;
23
- protected refresh({ offsetTop, height }: VisualViewport): void;
13
+ protected refresh(): void;
24
14
  private get focused();
25
15
  static ɵfac: i0.ɵɵFactoryDeclaration<TuiDropdownMobileComponent, never>;
26
- static ɵcmp: i0.ɵɵComponentDeclaration<TuiDropdownMobileComponent, "tui-dropdown-mobile", never, {}, {}, never, never, true, [{ directive: typeof i1.TuiActiveZone; inputs: {}; outputs: {}; }, { directive: typeof i2.TuiAnimated; inputs: {}; outputs: {}; }]>;
16
+ static ɵcmp: i0.ɵɵComponentDeclaration<TuiDropdownMobileComponent, "tui-dropdown-mobile", never, {}, {}, never, ["*"], true, never>;
27
17
  }
@@ -2,5 +2,4 @@ export * from '@taiga-ui/addon-mobile/directives/dropdown-mobile';
2
2
  export * from '@taiga-ui/addon-mobile/directives/elastic-sticky';
3
3
  export * from '@taiga-ui/addon-mobile/directives/responsive-dialog';
4
4
  export * from '@taiga-ui/addon-mobile/directives/ripple';
5
- export * from '@taiga-ui/addon-mobile/directives/sidebar';
6
5
  export * from '@taiga-ui/addon-mobile/directives/touchable';
@@ -2,7 +2,7 @@ import * as i0 from "@angular/core";
2
2
  export declare class TuiRipple {
3
3
  private readonly doc;
4
4
  private readonly destroyRef;
5
- private readonly animationOptions;
5
+ private readonly duration;
6
6
  protected readonly nothing: undefined;
7
7
  tuiRipple: string;
8
8
  protected start(x: number, y: number, target: HTMLElement, el: HTMLElement): void;
@@ -2,7 +2,7 @@ import * as i0 from '@angular/core';
2
2
  import { Input, ViewChild, ViewChildren, ChangeDetectionStrategy, Component } from '@angular/core';
3
3
  import { EMPTY_QUERY } from '@taiga-ui/cdk/constants';
4
4
  import { tuiInjectElement } from '@taiga-ui/cdk/utils/dom';
5
- import { tuiHeaderOptionsProvider } from '@taiga-ui/layout/components/header';
5
+ import { tuiHeaderOptionsProvider } from '@taiga-ui/core/components/header';
6
6
 
7
7
  const OPTIONS = {
8
8
  duration: 20,
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-addon-mobile-components-bottom-sheet.mjs","sources":["../../../projects/addon-mobile/components/bottom-sheet/bottom-sheet.component.ts","../../../projects/addon-mobile/components/bottom-sheet/bottom-sheet.template.html","../../../projects/addon-mobile/components/bottom-sheet/taiga-ui-addon-mobile-components-bottom-sheet.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n type ElementRef,\n Input,\n type QueryList,\n ViewChild,\n ViewChildren,\n} from '@angular/core';\nimport {EMPTY_QUERY} from '@taiga-ui/cdk/constants';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {tuiHeaderOptionsProvider} from '@taiga-ui/layout/components/header';\n\nconst OPTIONS = {\n duration: 20,\n easing: 'ease-in',\n fill: 'forwards',\n} as const;\n\n@Component({\n selector: 'tui-bottom-sheet',\n templateUrl: './bottom-sheet.template.html',\n styleUrls: ['./bottom-sheet.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [tuiHeaderOptionsProvider({size: 'h5'})],\n host: {\n '[style.--t-initial]': 'stops[0]',\n '[style.scroll-snap-type]': 'stops.length > 1 ? \"y mandatory\" : null',\n '(scroll.zoneless)': 'onScroll()',\n '(resize)': 'onScroll()',\n },\n})\nexport class TuiBottomSheet {\n @ViewChildren('stops')\n private readonly elements: QueryList<ElementRef<HTMLElement>> = EMPTY_QUERY;\n\n @ViewChild('content')\n private readonly content?: ElementRef<HTMLElement>;\n\n private readonly el = tuiInjectElement();\n\n @Input()\n public stops: readonly string[] = ['1.5rem'];\n\n protected onScroll(): void {\n const {clientHeight, scrollTop, scrollHeight} = this.el;\n const top = this.elements.get(0)?.nativeElement.clientHeight || 0;\n const max = this.content?.nativeElement.clientHeight || Infinity;\n const height = Math.min(clientHeight, max);\n const scrolled = Math.min(scrollTop, height - top);\n const transform = `translate3d(0, ${-1 * scrolled}px, 0)`;\n\n this.el.style.setProperty('--t-height', `${scrollHeight}px`);\n this.el.animate([{transform}], OPTIONS);\n }\n}\n","@for (stop of stops; track stop) {\n <div\n #stops\n class=\"t-stop\"\n [style.top]=\"stop\"\n ></div>\n}\n<div\n #content\n class=\"t-content\"\n (resize)=\"onScroll()\"\n>\n <ng-content />\n</div>\n<div class=\"t-bottom\"></div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAaA,MAAM,OAAO,GAAG;AACZ,IAAA,QAAQ,EAAE,EAAE;AACZ,IAAA,MAAM,EAAE,SAAS;AACjB,IAAA,IAAI,EAAE,UAAU;CACV;MAeG,cAAc,CAAA;AAb3B,IAAA,WAAA,GAAA;QAeqB,IAAQ,CAAA,QAAA,GAAuC,WAAW;QAK1D,IAAE,CAAA,EAAA,GAAG,gBAAgB,EAAE;AAGjC,QAAA,IAAA,CAAA,KAAK,GAAsB,CAAC,QAAQ,CAAC;AAa/C;IAXa,QAAQ,GAAA;QACd,MAA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,EAAA,SAAA,EAAA,CAAC,wBAAwB,CAAC,EAAC,IAAI,EAAE,IAAI,EAAC,CAAC,CAAC,EAAA,WAAA,EAAA,CAAA,EAAA,YAAA,EAAA,SAAA,EAAA,KAAA,EAAA,IAAA,EAAA,SAAA,EAAA,CAAA,SAAA,CAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,EAAA,YAAA,EAAA,UAAA,EAAA,SAAA,EAAA,CAAA,OAAA,CAAA,EAAA,WAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECxBvD,iRAeA,EAAA,MAAA,EAAA,CAAA,89CAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;4FDiBa,cAAc,EAAA,UAAA,EAAA,CAAA;kBAb1B,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,kBAAkB,EAGX,eAAA,EAAA,uBAAuB,CAAC,MAAM,aACpC,CAAC,wBAAwB,CAAC,EAAC,IAAI,EAAE,IAAI,EAAC,CAAC,CAAC,EAC7C,IAAA,EAAA;AACF,wBAAA,qBAAqB,EAAE,UAAU;AACjC,wBAAA,0BAA0B,EAAE,yCAAyC;AACrE,wBAAA,mBAAmB,EAAE,YAAY;AACjC,wBAAA,UAAU,EAAE,YAAY;AAC3B,qBAAA,EAAA,QAAA,EAAA,iRAAA,EAAA,MAAA,EAAA,CAAA,89CAAA,CAAA,EAAA;8BAIgB,QAAQ,EAAA,CAAA;sBADxB,YAAY;uBAAC,OAAO;gBAIJ,OAAO,EAAA,CAAA;sBADvB,SAAS;uBAAC,SAAS;gBAMb,KAAK,EAAA,CAAA;sBADX;;;AEzCL;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-addon-mobile-components-bottom-sheet.mjs","sources":["../../../projects/addon-mobile/components/bottom-sheet/bottom-sheet.component.ts","../../../projects/addon-mobile/components/bottom-sheet/bottom-sheet.template.html","../../../projects/addon-mobile/components/bottom-sheet/taiga-ui-addon-mobile-components-bottom-sheet.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n type ElementRef,\n Input,\n type QueryList,\n ViewChild,\n ViewChildren,\n} from '@angular/core';\nimport {EMPTY_QUERY} from '@taiga-ui/cdk/constants';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {tuiHeaderOptionsProvider} from '@taiga-ui/core/components/header';\n\nconst OPTIONS = {\n duration: 20,\n easing: 'ease-in',\n fill: 'forwards',\n} as const;\n\n@Component({\n selector: 'tui-bottom-sheet',\n templateUrl: './bottom-sheet.template.html',\n styleUrls: ['./bottom-sheet.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [tuiHeaderOptionsProvider({size: 'h5'})],\n host: {\n '[style.--t-initial]': 'stops[0]',\n '[style.scroll-snap-type]': 'stops.length > 1 ? \"y mandatory\" : null',\n '(scroll.zoneless)': 'onScroll()',\n '(resize)': 'onScroll()',\n },\n})\nexport class TuiBottomSheet {\n @ViewChildren('stops')\n private readonly elements: QueryList<ElementRef<HTMLElement>> = EMPTY_QUERY;\n\n @ViewChild('content')\n private readonly content?: ElementRef<HTMLElement>;\n\n private readonly el = tuiInjectElement();\n\n @Input()\n public stops: readonly string[] = ['1.5rem'];\n\n protected onScroll(): void {\n const {clientHeight, scrollTop, scrollHeight} = this.el;\n const top = this.elements.get(0)?.nativeElement.clientHeight || 0;\n const max = this.content?.nativeElement.clientHeight || Infinity;\n const height = Math.min(clientHeight, max);\n const scrolled = Math.min(scrollTop, height - top);\n const transform = `translate3d(0, ${-1 * scrolled}px, 0)`;\n\n this.el.style.setProperty('--t-height', `${scrollHeight}px`);\n this.el.animate([{transform}], OPTIONS);\n }\n}\n","@for (stop of stops; track stop) {\n <div\n #stops\n class=\"t-stop\"\n [style.top]=\"stop\"\n ></div>\n}\n<div\n #content\n class=\"t-content\"\n (resize)=\"onScroll()\"\n>\n <ng-content />\n</div>\n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,EAAE,YAAY;AACjC,wBAAA,UAAU,EAAE,YAAY;AAC3B,qBAAA,EAAA,QAAA,EAAA,iRAAA,EAAA,MAAA,EAAA,CAAA,89CAAA,CAAA,EAAA;8BAIgB,QAAQ,EAAA,CAAA;sBADxB,YAAY;uBAAC,OAAO;gBAIJ,OAAO,EAAA,CAAA;sBADvB,SAAS;uBAAC,SAAS;gBAMb,KAAK,EAAA,CAAA;sBADX;;;AEzCL;;AAEG;;;;"}
@@ -64,7 +64,7 @@ const TUI_PULL_TO_REFRESH_COMPONENT = new InjectionToken(ngDevMode ? 'TUI_PULL_T
64
64
  });
65
65
 
66
66
  const MICRO_OFFSET = 10 ** -6;
67
- const EXCLUSION_SELECTORS = 'tui-dialog, tui-dropdown, tui-dropdown-mobile';
67
+ const EXCLUSION_SELECTORS = 'tui-dialog, tui-sheet-dialog, tui-dropdown, tui-dropdown-mobile';
68
68
  class TuiPullToRefreshService extends Observable {
69
69
  constructor() {
70
70
  const component = inject(TUI_PULL_TO_REFRESH_COMPONENT);
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-addon-mobile-components-pull-to-refresh.mjs","sources":["../../../projects/addon-mobile/components/pull-to-refresh/loader-ios/loader-ios.component.ts","../../../projects/addon-mobile/components/pull-to-refresh/loader-ios/loader-ios.template.html","../../../projects/addon-mobile/components/pull-to-refresh/pull-to-refresh.providers.ts","../../../projects/addon-mobile/components/pull-to-refresh/pull-to-refresh.service.ts","../../../projects/addon-mobile/components/pull-to-refresh/loader-android/loader-android.component.ts","../../../projects/addon-mobile/components/pull-to-refresh/loader-android/loader-android.template.html","../../../projects/addon-mobile/components/pull-to-refresh/pull-to-refresh.component.ts","../../../projects/addon-mobile/components/pull-to-refresh/pull-to-refresh.template.html","../../../projects/addon-mobile/components/pull-to-refresh/taiga-ui-addon-mobile-components-pull-to-refresh.ts"],"sourcesContent":["import {ChangeDetectionStrategy, Component, inject} from '@angular/core';\nimport {TuiRepeatTimes} from '@taiga-ui/cdk/directives/repeat-times';\nimport {type TuiContext} from '@taiga-ui/cdk/types';\nimport {injectContext, PolymorpheusComponent} from '@taiga-ui/polymorpheus';\n\nimport {TUI_PULL_TO_REFRESH_THRESHOLD} from '../pull-to-refresh.providers';\n\nconst LOADED_STEP = 8;\nconst ROTATE_X_STEP = 30;\n\n@Component({\n selector: 'tui-mobile-ios-loader',\n imports: [TuiRepeatTimes],\n templateUrl: './loader-ios.template.html',\n styleUrls: ['./loader-ios.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiMobileLoaderIOS {\n private readonly context = injectContext<TuiContext<number>>();\n private readonly threshold = inject(TUI_PULL_TO_REFRESH_THRESHOLD);\n\n protected readonly steps = 12;\n\n protected get finished(): boolean {\n return this.percent >= 100;\n }\n\n protected get percent(): number {\n return (this.context.$implicit * 100) / this.threshold;\n }\n\n protected isShown(index: number): boolean {\n return this.percent > (index + 1) * LOADED_STEP;\n }\n\n protected calculateTransform(index: number): string {\n return `rotate(${index * ROTATE_X_STEP} 50 50)`;\n }\n\n protected calculateAnimationBegin(index: number): string {\n return `${(index * LOADED_STEP) / 100}s`;\n }\n}\n\nexport const TUI_IOS_LOADER = new PolymorpheusComponent(TuiMobileLoaderIOS);\n","<svg\n height=\"36\"\n preserveAspectRatio=\"xMidYMid\"\n viewBox=\"0 0 100 100\"\n width=\"36\"\n xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n xmlns=\"http://www.w3.org/2000/svg\"\n>\n <ng-container *tuiRepeatTimes=\"let index of steps\">\n @if (isShown(index)) {\n <g [attr.transform]=\"calculateTransform(index)\">\n <rect\n fill=\"#c7c9cc\"\n height=\"16\"\n rx=\"7.05\"\n ry=\"3.3\"\n width=\"6\"\n x=\"47\"\n y=\"22\"\n >\n @if (finished) {\n <animate\n attributeName=\"opacity\"\n dur=\"1s\"\n keyTimes=\"0;1\"\n repeatCount=\"indefinite\"\n values=\"1;0\"\n [attr.begin]=\"calculateAnimationBegin(index)\"\n />\n }\n </rect>\n </g>\n }\n </ng-container>\n</svg>\n","import {inject, InjectionToken} from '@angular/core';\nimport {TUI_IS_IOS} from '@taiga-ui/cdk/tokens';\nimport {type TuiContext} from '@taiga-ui/cdk/types';\nimport {type PolymorpheusContent} from '@taiga-ui/polymorpheus';\nimport {EMPTY, type Observable} from 'rxjs';\n\nimport {TUI_ANDROID_LOADER} from './loader-android/loader-android.component';\nimport {TUI_IOS_LOADER} from './loader-ios/loader-ios.component';\n\n/**\n * Stream that emits when loading is over\n */\nexport const TUI_PULL_TO_REFRESH_LOADED = new InjectionToken<Observable<unknown>>(\n ngDevMode ? 'TUI_PULL_TO_REFRESH_LOADED' : '',\n {\n factory: () => EMPTY,\n },\n);\n\n/**\n * Pull threshold in pixels until loading starts\n */\nexport const TUI_PULL_TO_REFRESH_THRESHOLD = new InjectionToken(\n ngDevMode ? 'TUI_PULL_TO_REFRESH_THRESHOLD' : '',\n {\n factory: () => 50,\n },\n);\n\n/**\n * Loading indicator component that gets current pull distance in pixels as context\n */\nexport const TUI_PULL_TO_REFRESH_COMPONENT = new InjectionToken<\n PolymorpheusContent<TuiContext<number>>\n>(ngDevMode ? 'TUI_PULL_TO_REFRESH_COMPONENT' : '', {\n factory: () => (inject(TUI_IS_IOS) ? TUI_IOS_LOADER : TUI_ANDROID_LOADER),\n});\n","import {type ElementRef, inject, Injectable} from '@angular/core';\nimport {\n tuiScrollFrom,\n tuiTypedFromEvent,\n tuiZonefreeScheduler,\n tuiZoneOptimized,\n} from '@taiga-ui/cdk/observables';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {TUI_SCROLL_REF} from '@taiga-ui/core/tokens';\nimport {\n debounceTime,\n distinctUntilChanged,\n EMPTY,\n endWith,\n filter,\n map,\n Observable,\n scan,\n share,\n startWith,\n switchMap,\n takeUntil,\n takeWhile,\n tap,\n} from 'rxjs';\n\nimport {\n TUI_PULL_TO_REFRESH_COMPONENT,\n TUI_PULL_TO_REFRESH_LOADED,\n TUI_PULL_TO_REFRESH_THRESHOLD,\n} from './pull-to-refresh.providers';\n\nexport const MICRO_OFFSET = 10 ** -6;\nconst EXCLUSION_SELECTORS = 'tui-dialog, tui-dropdown, tui-dropdown-mobile';\n\n@Injectable()\nexport class TuiPullToRefreshService extends Observable<number> {\n private readonly el = tuiInjectElement();\n private readonly scrollRef: ElementRef<HTMLElement> = inject(TUI_SCROLL_REF);\n private readonly loaded$ = inject(TUI_PULL_TO_REFRESH_LOADED);\n private readonly threshold = inject(TUI_PULL_TO_REFRESH_THRESHOLD);\n\n // Hack for iOS to determine if pulling stopped due to scroll\n // because Safari does not support `touch-action: pan-down`\n private touched = false;\n\n private readonly pulling$ = this.loaded$.pipe(\n startWith(null),\n switchMap(() =>\n tuiTypedFromEvent(this.el, 'touchstart', {passive: true}).pipe(\n filter(\n () =>\n !this.scrollRef.nativeElement.scrollTop &&\n !this.el.querySelector(EXCLUSION_SELECTORS),\n ),\n map(({touches}) => touches[0]?.clientY ?? 0),\n switchMap((start) =>\n tuiTypedFromEvent(this.el, 'touchmove').pipe(\n tap((): void => {\n this.touched = true;\n }),\n map(({touches}) => (touches[0]?.clientY ?? 0) - start),\n filter((distance) => distance > 0),\n takeUntil(\n tuiTypedFromEvent(this.el, 'touchend').pipe(\n tap((): void => {\n this.touched = false;\n }),\n ),\n ),\n takeUntil(tuiScrollFrom(this.scrollRef.nativeElement)),\n endWith(0),\n ),\n ),\n scan(\n (prev, current) =>\n !current && !this.touched && prev > this.threshold\n ? this.threshold\n : current + current * MICRO_OFFSET,\n 0,\n ),\n takeWhile((distance) => distance !== this.threshold, true),\n startWith(0),\n ),\n ),\n debounceTime(0, tuiZonefreeScheduler()),\n distinctUntilChanged(),\n tuiZoneOptimized(),\n share(),\n );\n\n constructor() {\n const component = inject(TUI_PULL_TO_REFRESH_COMPONENT);\n\n super((subscriber) => (component ? this.pulling$ : EMPTY).subscribe(subscriber));\n }\n}\n","import {ChangeDetectionStrategy, Component, inject} from '@angular/core';\nimport {type TuiContext} from '@taiga-ui/cdk/types';\nimport {TuiLoader} from '@taiga-ui/core/components/loader';\nimport {injectContext, PolymorpheusComponent} from '@taiga-ui/polymorpheus';\n\nimport {TUI_PULL_TO_REFRESH_THRESHOLD} from '../pull-to-refresh.providers';\nimport {MICRO_OFFSET} from '../pull-to-refresh.service';\n\nconst ROTATE_X_DEFAULT = 180;\nconst ROTATE_X_MAX = 500;\nconst ROTATE_X_MULTIPLIER = 2.3;\n\n@Component({\n selector: 'tui-mobile-android-loader',\n imports: [TuiLoader],\n templateUrl: './loader-android.template.html',\n styleUrls: ['./loader-android.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class._visible]': 'percent',\n '[class._dropped]': 'dropped',\n '[style.transform]': 'hostTransform',\n },\n})\nexport class TuiMobileLoaderAndroid {\n private readonly context = injectContext<TuiContext<number>>();\n private readonly threshold = inject(TUI_PULL_TO_REFRESH_THRESHOLD);\n\n protected get percent(): number {\n return (this.context.$implicit * 100) / this.threshold;\n }\n\n protected get dropped(): boolean {\n return (\n this.context.$implicit <= MICRO_OFFSET ||\n this.context.$implicit === this.threshold\n );\n }\n\n protected get hostTransform(): string {\n return `translateY(${Math.min(this.context.$implicit, this.threshold * 1.5)}px)`;\n }\n\n protected get opacity(): number {\n return this.context.$implicit / (this.threshold * 1.5);\n }\n\n protected get transform(): string {\n const rotateX = Math.min(\n ROTATE_X_DEFAULT + this.percent * ROTATE_X_MULTIPLIER,\n ROTATE_X_MAX,\n );\n\n return `rotate(${rotateX} 0 0)`;\n }\n}\n\nexport const TUI_ANDROID_LOADER = new PolymorpheusComponent(TuiMobileLoaderAndroid);\n","<div class=\"t-wrapper\">\n @if (percent !== 100) {\n <svg\n fill=\"none\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n width=\"24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n [attr.transform]=\"transform\"\n [style.opacity]=\"opacity\"\n >\n <defs>\n <mask id=\"mask-1\">\n <path\n clip-rule=\"evenodd\"\n d=\"M21 12C21 7.03 16.97 3 12 3C7.03 3 3 7.03 3 12C3 16.97 7.03 21 12 21C14.06 21 15.96 20.3 17.48 19.14L16.06 17.7C14.91 18.51 13.51 19 12 19C8.13 19 5 15.87 5 12C5 8.13 8.13 5 12 5C15.87 5 19 8.13 19 12H16L20 16L24 12H21Z\"\n fill=\"white\"\n fill-rule=\"evenodd\"\n />\n </mask>\n </defs>\n <g mask=\"url(#mask-1)\">\n <path\n clip-rule=\"evenodd\"\n d=\"M21 12C21 7.03 16.97 3 12 3C7.03 3 3 7.03 3 12C3 16.97 7.03 21 12 21C14.06 21 15.96 20.3 17.48 19.14L16.06 17.7C14.91 18.51 13.51 19 12 19C8.13 19 5 15.87 5 12C5 8.13 8.13 5 12 5C15.87 5 19 8.13 19 12H16L20 16L24 12H21Z\"\n fill=\"black\"\n fill-rule=\"evenodd\"\n />\n </g>\n </svg>\n } @else {\n <tui-loader\n size=\"s\"\n class=\"t-loader\"\n [inheritColor]=\"true\"\n />\n }\n</div>\n","import {AsyncPipe} from '@angular/common';\nimport {ChangeDetectionStrategy, Component, inject, Input, Output} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {tuiScrollFrom, tuiZonefree} from '@taiga-ui/cdk/observables';\nimport {TUI_IS_IOS} from '@taiga-ui/cdk/tokens';\nimport {type TuiContext, type TuiHandler} from '@taiga-ui/cdk/types';\nimport {tuiPx} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TUI_SCROLL_REF} from '@taiga-ui/core/tokens';\nimport {type PolymorpheusContent, PolymorpheusOutlet} from '@taiga-ui/polymorpheus';\nimport {distinctUntilChanged, filter, map, type Observable, startWith} from 'rxjs';\n\nimport {\n TUI_PULL_TO_REFRESH_COMPONENT,\n TUI_PULL_TO_REFRESH_THRESHOLD,\n} from './pull-to-refresh.providers';\nimport {MICRO_OFFSET, TuiPullToRefreshService} from './pull-to-refresh.service';\n\n@Component({\n selector: 'tui-pull-to-refresh',\n imports: [AsyncPipe, PolymorpheusOutlet],\n templateUrl: './pull-to-refresh.template.html',\n styleUrls: ['./pull-to-refresh.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [TuiPullToRefreshService],\n})\nexport class TuiPullToRefresh {\n private readonly isIOS = inject(TUI_IS_IOS);\n private readonly threshold = inject(TUI_PULL_TO_REFRESH_THRESHOLD);\n\n protected readonly pulling$ = inject(TuiPullToRefreshService);\n protected readonly component = inject<PolymorpheusContent<TuiContext<number>>>(\n TUI_PULL_TO_REFRESH_COMPONENT,\n );\n\n protected readonly dropped$: Observable<boolean> = this.pulling$.pipe(\n map((distance) => distance <= MICRO_OFFSET || distance === this.threshold),\n distinctUntilChanged(),\n );\n\n @Input()\n public styleHandler: TuiHandler<number, Record<string, unknown> | null> = this.isIOS\n ? (distance) => ({top: tuiPx(distance / 2)})\n : () => null;\n\n @Output()\n public readonly pulled: Observable<unknown> = inject(TuiPullToRefreshService).pipe(\n filter((distance) => distance === this.threshold),\n );\n\n constructor() {\n if (!this.component) {\n return; // Ensure scrolling down is impossible while pulling\n }\n\n const el: HTMLElement = inject(TUI_SCROLL_REF).nativeElement;\n\n tuiScrollFrom(el)\n .pipe(startWith(null), tuiZonefree(), takeUntilDestroyed())\n .subscribe(() => {\n if (el.scrollTop) {\n el.style.touchAction = '';\n } else {\n el.style.touchAction = 'pan-down';\n }\n });\n }\n}\n","<ng-container *polymorpheusOutlet=\"component; context: {$implicit: (pulling$ | async) || 0}\" />\n\n<div\n [class.t-drop]=\"dropped$ | async\"\n [style.position]=\"'relative'\"\n [style]=\"styleHandler((pulling$ | async) || 0)\"\n>\n <ng-content />\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAOA,MAAM,WAAW,GAAG,CAAC;AACrB,MAAM,aAAa,GAAG,EAAE;MASX,kBAAkB,CAAA;AAP/B,IAAA,WAAA,GAAA;QAQqB,IAAO,CAAA,OAAA,GAAG,aA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
+ {"version":3,"file":"taiga-ui-addon-mobile-components-pull-to-refresh.mjs","sources":["../../../projects/addon-mobile/components/pull-to-refresh/loader-ios/loader-ios.component.ts","../../../projects/addon-mobile/components/pull-to-refresh/loader-ios/loader-ios.template.html","../../../projects/addon-mobile/components/pull-to-refresh/pull-to-refresh.providers.ts","../../../projects/addon-mobile/components/pull-to-refresh/pull-to-refresh.service.ts","../../../projects/addon-mobile/components/pull-to-refresh/loader-android/loader-android.component.ts","../../../projects/addon-mobile/components/pull-to-refresh/loader-android/loader-android.template.html","../../../projects/addon-mobile/components/pull-to-refresh/pull-to-refresh.component.ts","../../../projects/addon-mobile/components/pull-to-refresh/pull-to-refresh.template.html","../../../projects/addon-mobile/components/pull-to-refresh/taiga-ui-addon-mobile-components-pull-to-refresh.ts"],"sourcesContent":["import {ChangeDetectionStrategy, Component, inject} from '@angular/core';\nimport {TuiRepeatTimes} from '@taiga-ui/cdk/directives/repeat-times';\nimport {type TuiContext} from '@taiga-ui/cdk/types';\nimport {injectContext, PolymorpheusComponent} from '@taiga-ui/polymorpheus';\n\nimport {TUI_PULL_TO_REFRESH_THRESHOLD} from '../pull-to-refresh.providers';\n\nconst LOADED_STEP = 8;\nconst ROTATE_X_STEP = 30;\n\n@Component({\n selector: 'tui-mobile-ios-loader',\n imports: [TuiRepeatTimes],\n templateUrl: './loader-ios.template.html',\n styleUrls: ['./loader-ios.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class TuiMobileLoaderIOS {\n private readonly context = injectContext<TuiContext<number>>();\n private readonly threshold = inject(TUI_PULL_TO_REFRESH_THRESHOLD);\n\n protected readonly steps = 12;\n\n protected get finished(): boolean {\n return this.percent >= 100;\n }\n\n protected get percent(): number {\n return (this.context.$implicit * 100) / this.threshold;\n }\n\n protected isShown(index: number): boolean {\n return this.percent > (index + 1) * LOADED_STEP;\n }\n\n protected calculateTransform(index: number): string {\n return `rotate(${index * ROTATE_X_STEP} 50 50)`;\n }\n\n protected calculateAnimationBegin(index: number): string {\n return `${(index * LOADED_STEP) / 100}s`;\n }\n}\n\nexport const TUI_IOS_LOADER = new PolymorpheusComponent(TuiMobileLoaderIOS);\n","<svg\n height=\"36\"\n preserveAspectRatio=\"xMidYMid\"\n viewBox=\"0 0 100 100\"\n width=\"36\"\n xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n xmlns=\"http://www.w3.org/2000/svg\"\n>\n <ng-container *tuiRepeatTimes=\"let index of steps\">\n @if (isShown(index)) {\n <g [attr.transform]=\"calculateTransform(index)\">\n <rect\n fill=\"#c7c9cc\"\n height=\"16\"\n rx=\"7.05\"\n ry=\"3.3\"\n width=\"6\"\n x=\"47\"\n y=\"22\"\n >\n @if (finished) {\n <animate\n attributeName=\"opacity\"\n dur=\"1s\"\n keyTimes=\"0;1\"\n repeatCount=\"indefinite\"\n values=\"1;0\"\n [attr.begin]=\"calculateAnimationBegin(index)\"\n />\n }\n </rect>\n </g>\n }\n </ng-container>\n</svg>\n","import {inject, InjectionToken} from '@angular/core';\nimport {TUI_IS_IOS} from '@taiga-ui/cdk/tokens';\nimport {type TuiContext} from '@taiga-ui/cdk/types';\nimport {type PolymorpheusContent} from '@taiga-ui/polymorpheus';\nimport {EMPTY, type Observable} from 'rxjs';\n\nimport {TUI_ANDROID_LOADER} from './loader-android/loader-android.component';\nimport {TUI_IOS_LOADER} from './loader-ios/loader-ios.component';\n\n/**\n * Stream that emits when loading is over\n */\nexport const TUI_PULL_TO_REFRESH_LOADED = new InjectionToken<Observable<unknown>>(\n ngDevMode ? 'TUI_PULL_TO_REFRESH_LOADED' : '',\n {\n factory: () => EMPTY,\n },\n);\n\n/**\n * Pull threshold in pixels until loading starts\n */\nexport const TUI_PULL_TO_REFRESH_THRESHOLD = new InjectionToken(\n ngDevMode ? 'TUI_PULL_TO_REFRESH_THRESHOLD' : '',\n {\n factory: () => 50,\n },\n);\n\n/**\n * Loading indicator component that gets current pull distance in pixels as context\n */\nexport const TUI_PULL_TO_REFRESH_COMPONENT = new InjectionToken<\n PolymorpheusContent<TuiContext<number>>\n>(ngDevMode ? 'TUI_PULL_TO_REFRESH_COMPONENT' : '', {\n factory: () => (inject(TUI_IS_IOS) ? TUI_IOS_LOADER : TUI_ANDROID_LOADER),\n});\n","import {type ElementRef, inject, Injectable} from '@angular/core';\nimport {\n tuiScrollFrom,\n tuiTypedFromEvent,\n tuiZonefreeScheduler,\n tuiZoneOptimized,\n} from '@taiga-ui/cdk/observables';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {TUI_SCROLL_REF} from '@taiga-ui/core/tokens';\nimport {\n debounceTime,\n distinctUntilChanged,\n EMPTY,\n endWith,\n filter,\n map,\n Observable,\n scan,\n share,\n startWith,\n switchMap,\n takeUntil,\n takeWhile,\n tap,\n} from 'rxjs';\n\nimport {\n TUI_PULL_TO_REFRESH_COMPONENT,\n TUI_PULL_TO_REFRESH_LOADED,\n TUI_PULL_TO_REFRESH_THRESHOLD,\n} from './pull-to-refresh.providers';\n\nexport const MICRO_OFFSET = 10 ** -6;\nconst EXCLUSION_SELECTORS =\n 'tui-dialog, tui-sheet-dialog, tui-dropdown, tui-dropdown-mobile';\n\n@Injectable()\nexport class TuiPullToRefreshService extends Observable<number> {\n private readonly el = tuiInjectElement();\n private readonly scrollRef: ElementRef<HTMLElement> = inject(TUI_SCROLL_REF);\n private readonly loaded$ = inject(TUI_PULL_TO_REFRESH_LOADED);\n private readonly threshold = inject(TUI_PULL_TO_REFRESH_THRESHOLD);\n\n // Hack for iOS to determine if pulling stopped due to scroll\n // because Safari does not support `touch-action: pan-down`\n private touched = false;\n\n private readonly pulling$ = this.loaded$.pipe(\n startWith(null),\n switchMap(() =>\n tuiTypedFromEvent(this.el, 'touchstart', {passive: true}).pipe(\n filter(\n () =>\n !this.scrollRef.nativeElement.scrollTop &&\n !this.el.querySelector(EXCLUSION_SELECTORS),\n ),\n map(({touches}) => touches[0]?.clientY ?? 0),\n switchMap((start) =>\n tuiTypedFromEvent(this.el, 'touchmove').pipe(\n tap((): void => {\n this.touched = true;\n }),\n map(({touches}) => (touches[0]?.clientY ?? 0) - start),\n filter((distance) => distance > 0),\n takeUntil(\n tuiTypedFromEvent(this.el, 'touchend').pipe(\n tap((): void => {\n this.touched = false;\n }),\n ),\n ),\n takeUntil(tuiScrollFrom(this.scrollRef.nativeElement)),\n endWith(0),\n ),\n ),\n scan(\n (prev, current) =>\n !current && !this.touched && prev > this.threshold\n ? this.threshold\n : current + current * MICRO_OFFSET,\n 0,\n ),\n takeWhile((distance) => distance !== this.threshold, true),\n startWith(0),\n ),\n ),\n debounceTime(0, tuiZonefreeScheduler()),\n distinctUntilChanged(),\n tuiZoneOptimized(),\n share(),\n );\n\n constructor() {\n const component = inject(TUI_PULL_TO_REFRESH_COMPONENT);\n\n super((subscriber) => (component ? this.pulling$ : EMPTY).subscribe(subscriber));\n }\n}\n","import {ChangeDetectionStrategy, Component, inject} from '@angular/core';\nimport {type TuiContext} from '@taiga-ui/cdk/types';\nimport {TuiLoader} from '@taiga-ui/core/components/loader';\nimport {injectContext, PolymorpheusComponent} from '@taiga-ui/polymorpheus';\n\nimport {TUI_PULL_TO_REFRESH_THRESHOLD} from '../pull-to-refresh.providers';\nimport {MICRO_OFFSET} from '../pull-to-refresh.service';\n\nconst ROTATE_X_DEFAULT = 180;\nconst ROTATE_X_MAX = 500;\nconst ROTATE_X_MULTIPLIER = 2.3;\n\n@Component({\n selector: 'tui-mobile-android-loader',\n imports: [TuiLoader],\n templateUrl: './loader-android.template.html',\n styleUrls: ['./loader-android.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class._visible]': 'percent',\n '[class._dropped]': 'dropped',\n '[style.transform]': 'hostTransform',\n },\n})\nexport class TuiMobileLoaderAndroid {\n private readonly context = injectContext<TuiContext<number>>();\n private readonly threshold = inject(TUI_PULL_TO_REFRESH_THRESHOLD);\n\n protected get percent(): number {\n return (this.context.$implicit * 100) / this.threshold;\n }\n\n protected get dropped(): boolean {\n return (\n this.context.$implicit <= MICRO_OFFSET ||\n this.context.$implicit === this.threshold\n );\n }\n\n protected get hostTransform(): string {\n return `translateY(${Math.min(this.context.$implicit, this.threshold * 1.5)}px)`;\n }\n\n protected get opacity(): number {\n return this.context.$implicit / (this.threshold * 1.5);\n }\n\n protected get transform(): string {\n const rotateX = Math.min(\n ROTATE_X_DEFAULT + this.percent * ROTATE_X_MULTIPLIER,\n ROTATE_X_MAX,\n );\n\n return `rotate(${rotateX} 0 0)`;\n }\n}\n\nexport const TUI_ANDROID_LOADER = new PolymorpheusComponent(TuiMobileLoaderAndroid);\n","<div class=\"t-wrapper\">\n @if (percent !== 100) {\n <svg\n fill=\"none\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n width=\"24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n [attr.transform]=\"transform\"\n [style.opacity]=\"opacity\"\n >\n <defs>\n <mask id=\"mask-1\">\n <path\n clip-rule=\"evenodd\"\n d=\"M21 12C21 7.03 16.97 3 12 3C7.03 3 3 7.03 3 12C3 16.97 7.03 21 12 21C14.06 21 15.96 20.3 17.48 19.14L16.06 17.7C14.91 18.51 13.51 19 12 19C8.13 19 5 15.87 5 12C5 8.13 8.13 5 12 5C15.87 5 19 8.13 19 12H16L20 16L24 12H21Z\"\n fill=\"white\"\n fill-rule=\"evenodd\"\n />\n </mask>\n </defs>\n <g mask=\"url(#mask-1)\">\n <path\n clip-rule=\"evenodd\"\n d=\"M21 12C21 7.03 16.97 3 12 3C7.03 3 3 7.03 3 12C3 16.97 7.03 21 12 21C14.06 21 15.96 20.3 17.48 19.14L16.06 17.7C14.91 18.51 13.51 19 12 19C8.13 19 5 15.87 5 12C5 8.13 8.13 5 12 5C15.87 5 19 8.13 19 12H16L20 16L24 12H21Z\"\n fill=\"black\"\n fill-rule=\"evenodd\"\n />\n </g>\n </svg>\n } @else {\n <tui-loader\n size=\"s\"\n class=\"t-loader\"\n [inheritColor]=\"true\"\n />\n }\n</div>\n","import {AsyncPipe} from '@angular/common';\nimport {ChangeDetectionStrategy, Component, inject, Input, Output} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {tuiScrollFrom, tuiZonefree} from '@taiga-ui/cdk/observables';\nimport {TUI_IS_IOS} from '@taiga-ui/cdk/tokens';\nimport {type TuiContext, type TuiHandler} from '@taiga-ui/cdk/types';\nimport {tuiPx} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TUI_SCROLL_REF} from '@taiga-ui/core/tokens';\nimport {type PolymorpheusContent, PolymorpheusOutlet} from '@taiga-ui/polymorpheus';\nimport {distinctUntilChanged, filter, map, type Observable, startWith} from 'rxjs';\n\nimport {\n TUI_PULL_TO_REFRESH_COMPONENT,\n TUI_PULL_TO_REFRESH_THRESHOLD,\n} from './pull-to-refresh.providers';\nimport {MICRO_OFFSET, TuiPullToRefreshService} from './pull-to-refresh.service';\n\n@Component({\n selector: 'tui-pull-to-refresh',\n imports: [AsyncPipe, PolymorpheusOutlet],\n templateUrl: './pull-to-refresh.template.html',\n styleUrls: ['./pull-to-refresh.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [TuiPullToRefreshService],\n})\nexport class TuiPullToRefresh {\n private readonly isIOS = inject(TUI_IS_IOS);\n private readonly threshold = inject(TUI_PULL_TO_REFRESH_THRESHOLD);\n\n protected readonly pulling$ = inject(TuiPullToRefreshService);\n protected readonly component = inject<PolymorpheusContent<TuiContext<number>>>(\n TUI_PULL_TO_REFRESH_COMPONENT,\n );\n\n protected readonly dropped$: Observable<boolean> = this.pulling$.pipe(\n map((distance) => distance <= MICRO_OFFSET || distance === this.threshold),\n distinctUntilChanged(),\n );\n\n @Input()\n public styleHandler: TuiHandler<number, Record<string, unknown> | null> = this.isIOS\n ? (distance) => ({top: tuiPx(distance / 2)})\n : () => null;\n\n @Output()\n public readonly pulled: Observable<unknown> = inject(TuiPullToRefreshService).pipe(\n filter((distance) => distance === this.threshold),\n );\n\n constructor() {\n if (!this.component) {\n return; // Ensure scrolling down is impossible while pulling\n }\n\n const el: HTMLElement = inject(TUI_SCROLL_REF).nativeElement;\n\n tuiScrollFrom(el)\n .pipe(startWith(null), tuiZonefree(), takeUntilDestroyed())\n .subscribe(() => {\n if (el.scrollTop) {\n el.style.touchAction = '';\n } else {\n el.style.touchAction = 'pan-down';\n }\n });\n }\n}\n","<ng-container *polymorpheusOutlet=\"component; context: {$implicit: (pulling$ | async) || 0}\" />\n\n<div\n [class.t-drop]=\"dropped$ | async\"\n [style.position]=\"'relative'\"\n [style]=\"styleHandler((pulling$ | async) || 0)\"\n>\n <ng-content />\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAOA,MAAM,WAAW,GAAG,CAAC;AACrB,MAAM,aAAa,GAAG,EAAE;MASX,kBAAkB,CAAA;AAP/B,IAAA,WAAA,GAAA;QAQqB,IAAO,CAAA,OAAA,GAAG,aAAa,EAAsB;AAC7C,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,6BAA6B,CAAC;QAE/C,IAAK,CAAA,KAAA,GAAG,EAAE;AAqBhC;AAnBG,IAAA,IAAc,QAAQ,GAAA;AAClB,QAAA,OAAO,IAAI,CAAC,OAAO,IAAI,GAAG;;AAG9B,IAAA,IAAc,OAAO,GAAA;AACjB,QAAA,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,GAAG,GAAG,IAAI,IAAI,CAAC,SAAS;;AAGhD,IAAA,OAAO,CAAC,KAAa,EAAA;QAC3B,OAAO,IAAI,CAAC,OAAO,GAAG,CAAC,KAAK,GAAG,CAAC,IAAI,WAAW;;AAGzC,IAAA,kBAAkB,CAAC,KAAa,EAAA;AACtC,QAAA,OAAO,CAAU,OAAA,EAAA,KAAK,GAAG,aAAa,SAAS;;AAGzC,IAAA,uBAAuB,CAAC,KAAa,EAAA;QAC3C,OAAO,CAAA,EAAG,CAAC,KAAK,GAAG,WAAW,IAAI,GAA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EAAA,WAAA,EAAA,IAAA,EAAE,kBAAkB,EAAA,QAAA,EAAA,sBAAA,EAAA,MAAA,EAAA,CAAA,oBAAA,EAAA,2BAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;4FAM9B,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAR5B,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,qBAAqB,EACtB,OAAA,EAAA,CAAC,SAAS,EAAE,kBAAkB,CAAC,EAGvB,eAAA,EAAA,uBAAuB,CAAC,MAAM,EACpC,SAAA,EAAA,CAAC,uBAAuB,CAAC,EAAA,QAAA,EAAA,iRAAA,EAAA,MAAA,EAAA,CAAA,uEAAA,CAAA,EAAA;wDAiB7B,YAAY,EAAA,CAAA;sBADlB;gBAMe,MAAM,EAAA,CAAA;sBADrB;;;AE5CL;;AAEG;;;;"}
@@ -1,18 +1,18 @@
1
1
  import * as i0 from '@angular/core';
2
- import { ElementRef, ViewChildren, ChangeDetectionStrategy, Component, InjectionToken, inject, Injectable, Directive } from '@angular/core';
2
+ import { inject, ElementRef, ViewChildren, ChangeDetectionStrategy, Component, InjectionToken, Injectable, Directive } from '@angular/core';
3
3
  import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
4
- import { EMPTY_QUERY } from '@taiga-ui/cdk/constants';
4
+ import { EMPTY_QUERY, TUI_TRUE_HANDLER } from '@taiga-ui/cdk/constants';
5
5
  import * as i1 from '@taiga-ui/cdk/directives/animated';
6
6
  import { TuiAnimated } from '@taiga-ui/cdk/directives/animated';
7
7
  import { tuiCloseWatcher, tuiZonefull } from '@taiga-ui/cdk/observables';
8
8
  import { tuiInjectElement } from '@taiga-ui/cdk/utils/dom';
9
9
  import { tuiProvide, tuiProvideOptions } from '@taiga-ui/cdk/utils/miscellaneous';
10
+ import { TUI_DIALOGS_CLOSE, TUI_DIALOGS } from '@taiga-ui/core/components/dialog';
10
11
  import { TUI_SCROLL_REF } from '@taiga-ui/core/tokens';
11
12
  import { injectContext, PolymorpheusOutlet } from '@taiga-ui/polymorpheus';
12
- import { Subject, merge, exhaustMap, isObservable, take, of, filter, startWith, pairwise } from 'rxjs';
13
+ import { Subject, merge, map, exhaustMap, isObservable, take, of, filter, startWith, pairwise } from 'rxjs';
13
14
  import { TuiPopoverDirective } from '@taiga-ui/cdk/directives/popover';
14
15
  import { TuiPopoverService, TuiThemeColorService, tuiAsPopover } from '@taiga-ui/cdk/services';
15
- import { TUI_DIALOGS } from '@taiga-ui/core/components/dialog';
16
16
 
17
17
  const REQUIRED_ERROR = new Error(ngDevMode ? 'Required dialog was dismissed' : '');
18
18
  class TuiSheetDialogComponent {
@@ -22,15 +22,15 @@ class TuiSheetDialogComponent {
22
22
  this.pointers = 0;
23
23
  this.context = injectContext();
24
24
  this.close$ = new Subject();
25
- this.$ = merge(this.close$, tuiCloseWatcher())
25
+ this.$ = merge(this.close$, tuiCloseWatcher(), inject(TUI_DIALOGS_CLOSE).pipe(map(TUI_TRUE_HANDLER)))
26
26
  .pipe(tuiZonefull(), exhaustMap(() => {
27
- if (isObservable(this.context.closeable)) {
27
+ if (isObservable(this.context.closable)) {
28
28
  if (this.el.scrollTop <= 0) {
29
29
  this.el.scrollTo({ top: this.initial, behavior: 'smooth' });
30
30
  }
31
- return this.context.closeable.pipe(take(1));
31
+ return this.context.closable.pipe(take(1));
32
32
  }
33
- return of(this.context.closeable);
33
+ return of(this.context.closable);
34
34
  }), filter(Boolean), takeUntilDestroyed())
35
35
  .subscribe(() => this.close());
36
36
  }
@@ -44,7 +44,7 @@ class TuiSheetDialogComponent {
44
44
  }
45
45
  }
46
46
  get initial() {
47
- if (!this.context.closeable) {
47
+ if (!this.context.closable) {
48
48
  return 0;
49
49
  }
50
50
  return (this.stops
@@ -60,21 +60,21 @@ class TuiSheetDialogComponent {
60
60
  }
61
61
  }
62
62
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiSheetDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
63
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiSheetDialogComponent, isStandalone: true, selector: "tui-sheet-dialog", host: { listeners: { "document:touchstart.passive.zoneless": "onPointerChange(1)", "document:touchend.zoneless": "onPointerChange(-1)", "document:touchcancel.zoneless": "onPointerChange(-1)", "scroll.zoneless": "onPointerChange(0)", "click.self": "close$.next()" }, properties: { "attr.data-appearance": "context.appearance", "style.--tui-offset.px": "context.offset", "class._closeable": "context.closeable", "class._fullscreen": "context.fullscreen === true" } }, providers: [tuiProvide(TUI_SCROLL_REF, ElementRef)], viewQueries: [{ propertyName: "stops", predicate: ["stops"], descendants: true }], hostDirectives: [{ directive: i1.TuiAnimated }], ngImport: i0, template: "<div class=\"t-stops\">\n @for (stop of context.stops; track stop) {\n <div\n #stops\n class=\"t-stop\"\n [style.margin-top]=\"stop\"\n ></div>\n }\n</div>\n<div class=\"t-sheet\">\n @if (context.bar && !context.appearance.includes('fullscreen')) {\n <div class=\"t-top\"></div>\n }\n @if (context.label) {\n <h2\n class=\"t-heading\"\n [id]=\"context.id\"\n >\n <ng-container *polymorpheusOutlet=\"context.label as label; context: context\">\n {{ label }}\n </ng-container>\n </h2>\n }\n <div class=\"t-content\">\n <div\n *polymorpheusOutlet=\"context.content as text; context: context\"\n [innerHTML]=\"text\"\n ></div>\n </div>\n</div>\n", styles: [":host{scrollbar-width:none;-ms-overflow-style:none;display:flex;inline-size:100%;max-inline-size:40rem;block-size:calc(100% - max(var(--tui-offset),env(safe-area-inset-top)));flex-direction:column;font:var(--tui-font-text-m);overflow-y:scroll;scroll-snap-type:y mandatory;margin:max(var(--tui-offset),env(safe-area-inset-top)) auto 0;border-radius:.75rem .75rem 0 0}:host::-webkit-scrollbar,:host::-webkit-scrollbar-thumb{display:none}:host.tui-enter,:host.tui-leave{animation-name:tuiFade,tuiSlide}:host:before{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;content:\"\";z-index:-1}:host._closeable{display:block}:host._closeable .t-stops{display:flex}:host._fullscreen,:host[data-appearance~=fullscreen]{display:block}:host._fullscreen .t-sheet,:host[data-appearance~=fullscreen] .t-sheet{display:flex;flex-direction:column;min-block-size:100%}:host._fullscreen .t-content,:host[data-appearance~=fullscreen] .t-content{display:flex;flex-direction:column;flex-grow:1}:host._fullscreen .t-content ::ng-deep>header,:host[data-appearance~=fullscreen] .t-content ::ng-deep>header,:host._fullscreen .t-content ::ng-deep>[tuiSlides]>*>header,:host[data-appearance~=fullscreen] .t-content ::ng-deep>[tuiSlides]>*>header,:host._fullscreen .t-content ::ng-deep>ng-component>header,:host[data-appearance~=fullscreen] .t-content ::ng-deep>ng-component>header,:host._fullscreen .t-content ::ng-deep>ng-component>[tuiSlides]>*>header,:host[data-appearance~=fullscreen] .t-content ::ng-deep>ng-component>[tuiSlides]>*>header{margin-block-end:1.5rem;font:var(--tui-font-heading-3)}:host._fullscreen .t-content ::ng-deep>header+p,:host[data-appearance~=fullscreen] .t-content ::ng-deep>header+p,:host._fullscreen .t-content ::ng-deep>[tuiSlides]>*>header+p,:host[data-appearance~=fullscreen] .t-content ::ng-deep>[tuiSlides]>*>header+p,:host._fullscreen .t-content ::ng-deep>ng-component>header+p,:host[data-appearance~=fullscreen] .t-content ::ng-deep>ng-component>header+p,:host._fullscreen .t-content ::ng-deep>ng-component>[tuiSlides]>*>header+p,:host[data-appearance~=fullscreen] .t-content ::ng-deep>ng-component>[tuiSlides]>*>header+p{margin:-.5rem 0 1.5rem}:host._fullscreen .t-content ::ng-deep>header:empty,:host[data-appearance~=fullscreen] .t-content ::ng-deep>header:empty,:host._fullscreen .t-content ::ng-deep>[tuiSlides]>*>header:empty,:host[data-appearance~=fullscreen] .t-content ::ng-deep>[tuiSlides]>*>header:empty,:host._fullscreen .t-content ::ng-deep>ng-component>header:empty,:host[data-appearance~=fullscreen] .t-content ::ng-deep>ng-component>header:empty,:host._fullscreen .t-content ::ng-deep>ng-component>[tuiSlides]>*>header:empty,:host[data-appearance~=fullscreen] .t-content ::ng-deep>ng-component>[tuiSlides]>*>header:empty{display:none}.t-stops{display:none;block-size:100%;scroll-snap-stop:always;scroll-snap-align:start;pointer-events:none}.t-stop{position:relative;top:env(safe-area-inset-bottom);scroll-snap-stop:normal;scroll-snap-align:start;block-size:1rem;inline-size:1rem}.t-sheet{scrollbar-width:none;-ms-overflow-style:none;inline-size:100%;box-shadow:var(--tui-shadow-small);border-radius:inherit;padding:0 1rem;margin-block-start:auto;background:var(--tui-background-elevation-1);box-sizing:border-box;scroll-snap-stop:always;scroll-snap-align:start}.t-sheet::-webkit-scrollbar,.t-sheet::-webkit-scrollbar-thumb{display:none}.t-top{position:sticky;top:0;z-index:1;block-size:1.5rem;margin:0 -1rem;border-radius:inherit;background:var(--tui-background-elevation-1)}.t-top:after{content:\"\";position:absolute;top:.5rem;left:50%;inline-size:2rem;block-size:.25rem;transform:translate(-50%);background:var(--tui-border-normal);border-radius:1rem}.t-heading{position:sticky;top:1.5rem;z-index:1;margin:0 -1rem;padding:.75rem 1rem;font:var(--tui-font-heading-6);background:var(--tui-background-elevation-1)}.t-heading:first-child{top:0;border-radius:inherit}.t-heading:last-child{padding-block-end:1.5rem}.t-content{position:relative;isolation:isolate;padding-block-end:max(1.5rem,env(safe-area-inset-bottom));border-radius:inherit}.t-content:after{content:\"\";position:relative;top:max(1.5rem,env(safe-area-inset-bottom));z-index:-1;display:block;scroll-snap-stop:always;scroll-snap-align:end;border-image:conic-gradient(var(--tui-background-elevation-1) 0 0) fill 0/0/0 100vh 100vh}\n"], dependencies: [{ kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
63
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiSheetDialogComponent, isStandalone: true, selector: "tui-sheet-dialog", host: { listeners: { "document:touchstart.passive.zoneless": "onPointerChange(1)", "document:touchend.zoneless": "onPointerChange(-1)", "document:touchcancel.zoneless": "onPointerChange(-1)", "scroll.zoneless": "onPointerChange(0)", "click.self": "close$.next()" }, properties: { "attr.data-appearance": "context.appearance", "style.--tui-offset.px": "context.offset", "class._closeable": "context.closable", "class._fullscreen": "context.fullscreen === true" } }, providers: [tuiProvide(TUI_SCROLL_REF, ElementRef)], viewQueries: [{ propertyName: "stops", predicate: ["stops"], descendants: true }], hostDirectives: [{ directive: i1.TuiAnimated }], ngImport: i0, template: "<div class=\"t-stops\">\n @for (stop of context.stops; track stop) {\n <div\n #stops\n class=\"t-stop\"\n [style.margin-top]=\"stop\"\n ></div>\n }\n</div>\n<div class=\"t-sheet\">\n @if (context.bar && !context.appearance.includes('fullscreen')) {\n <div class=\"t-top\"></div>\n }\n @if (context.label) {\n <h2\n class=\"t-heading\"\n [id]=\"context.id\"\n >\n <ng-container *polymorpheusOutlet=\"context.label as label; context: context\">\n {{ label }}\n </ng-container>\n </h2>\n }\n <div class=\"t-content\">\n <div\n *polymorpheusOutlet=\"context.content as text; context: context\"\n [innerHTML]=\"text\"\n ></div>\n </div>\n</div>\n", styles: [":host{scrollbar-width:none;-ms-overflow-style:none;display:flex;inline-size:100%;max-inline-size:40rem;block-size:calc(100% - max(var(--tui-offset),env(safe-area-inset-top)));flex-direction:column;font:var(--tui-font-text-m);overflow-y:scroll;scroll-snap-type:y mandatory;margin:max(var(--tui-offset),env(safe-area-inset-top)) auto 0;border-radius:.75rem .75rem 0 0}:host::-webkit-scrollbar,:host::-webkit-scrollbar-thumb{display:none}:host.tui-enter,:host.tui-leave{animation-name:tuiFade,tuiSlide}:host:before{position:fixed;top:0;left:0;inline-size:100%;block-size:100%;content:\"\";z-index:-1}:host._closeable{display:block}:host._closeable .t-stops{display:flex}:host._fullscreen,:host[data-appearance~=fullscreen]{display:block}:host._fullscreen .t-sheet,:host[data-appearance~=fullscreen] .t-sheet{display:flex;flex-direction:column;min-block-size:100%}:host._fullscreen .t-content,:host[data-appearance~=fullscreen] .t-content{display:flex;flex-direction:column;flex-grow:1}:host._fullscreen .t-content ::ng-deep>header,:host[data-appearance~=fullscreen] .t-content ::ng-deep>header,:host._fullscreen .t-content ::ng-deep>[tuiSlides]>*>header,:host[data-appearance~=fullscreen] .t-content ::ng-deep>[tuiSlides]>*>header,:host._fullscreen .t-content ::ng-deep>ng-component>header,:host[data-appearance~=fullscreen] .t-content ::ng-deep>ng-component>header,:host._fullscreen .t-content ::ng-deep>ng-component>[tuiSlides]>*>header,:host[data-appearance~=fullscreen] .t-content ::ng-deep>ng-component>[tuiSlides]>*>header{margin-block-end:1.5rem;font:var(--tui-font-heading-3)}:host._fullscreen .t-content ::ng-deep>header+p,:host[data-appearance~=fullscreen] .t-content ::ng-deep>header+p,:host._fullscreen .t-content ::ng-deep>[tuiSlides]>*>header+p,:host[data-appearance~=fullscreen] .t-content ::ng-deep>[tuiSlides]>*>header+p,:host._fullscreen .t-content ::ng-deep>ng-component>header+p,:host[data-appearance~=fullscreen] .t-content ::ng-deep>ng-component>header+p,:host._fullscreen .t-content ::ng-deep>ng-component>[tuiSlides]>*>header+p,:host[data-appearance~=fullscreen] .t-content ::ng-deep>ng-component>[tuiSlides]>*>header+p{margin:-.5rem 0 1.5rem}:host._fullscreen .t-content ::ng-deep>header:empty,:host[data-appearance~=fullscreen] .t-content ::ng-deep>header:empty,:host._fullscreen .t-content ::ng-deep>[tuiSlides]>*>header:empty,:host[data-appearance~=fullscreen] .t-content ::ng-deep>[tuiSlides]>*>header:empty,:host._fullscreen .t-content ::ng-deep>ng-component>header:empty,:host[data-appearance~=fullscreen] .t-content ::ng-deep>ng-component>header:empty,:host._fullscreen .t-content ::ng-deep>ng-component>[tuiSlides]>*>header:empty,:host[data-appearance~=fullscreen] .t-content ::ng-deep>ng-component>[tuiSlides]>*>header:empty{display:none}:host ::ng-deep tui-data-list{margin-inline-start:calc(-1 * var(--tui-data-list-padding));margin-inline-end:calc(-1 * var(--tui-data-list-padding))}:host ::ng-deep tui-data-list [tuiOption]{margin-inline-start:calc(-1 * var(--t-option-padding-inline));margin-inline-end:calc(-1 * var(--t-option-padding-inline))}.t-stops{display:none;block-size:100%;scroll-snap-stop:always;scroll-snap-align:start;pointer-events:none}.t-stop{position:relative;top:env(safe-area-inset-bottom);scroll-snap-stop:normal;scroll-snap-align:start;block-size:1rem;inline-size:1rem}.t-sheet{scrollbar-width:none;-ms-overflow-style:none;inline-size:100%;box-shadow:var(--tui-shadow-small);border-radius:inherit;padding:0 1rem;margin-block-start:auto;background:var(--tui-background-elevation-1);box-sizing:border-box;scroll-snap-stop:always;scroll-snap-align:start}.t-sheet::-webkit-scrollbar,.t-sheet::-webkit-scrollbar-thumb{display:none}.t-top{position:sticky;top:0;z-index:1;block-size:1.5rem;margin:0 -1rem;border-radius:inherit;background:var(--tui-background-elevation-1)}.t-top:after{content:\"\";position:absolute;top:.5rem;left:50%;inline-size:2rem;block-size:.25rem;transform:translate(-50%);background:var(--tui-border-normal);border-radius:1rem}.t-heading{position:sticky;top:1.5rem;z-index:1;margin:0 -1rem;padding:.75rem 1rem;font:var(--tui-font-heading-6);background:var(--tui-background-elevation-1)}.t-heading:first-child{top:0;border-radius:inherit}.t-heading:last-child{padding-block-end:1.5rem}.t-content{position:relative;isolation:isolate;padding-block-end:max(1.5rem,env(safe-area-inset-bottom));border-radius:inherit}.t-content:after{content:\"\";position:relative;top:max(1.5rem,env(safe-area-inset-bottom));z-index:-1;display:block;scroll-snap-stop:always;scroll-snap-align:end;border-image:conic-gradient(var(--tui-background-elevation-1) 0 0) fill 0/0/0 100vh 100vh}\n"], dependencies: [{ kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
64
64
  }
65
65
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiSheetDialogComponent, decorators: [{
66
66
  type: Component,
67
67
  args: [{ selector: 'tui-sheet-dialog', imports: [PolymorpheusOutlet], changeDetection: ChangeDetectionStrategy.OnPush, providers: [tuiProvide(TUI_SCROLL_REF, ElementRef)], hostDirectives: [TuiAnimated], host: {
68
68
  '[attr.data-appearance]': 'context.appearance',
69
69
  '[style.--tui-offset.px]': 'context.offset',
70
- '[class._closeable]': 'context.closeable',
70
+ '[class._closeable]': 'context.closable',
71
71
  '[class._fullscreen]': 'context.fullscreen === true',
72
72
  '(document:touchstart.passive.zoneless)': 'onPointerChange(1)',
73
73
  '(document:touchend.zoneless)': 'onPointerChange(-1)',
74
74
  '(document:touchcancel.zoneless)': 'onPointerChange(-1)',
75
75
  '(scroll.zoneless)': 'onPointerChange(0)',
76
76
  '(click.self)': 'close$.next()',
77
- }, template: "<div class=\"t-stops\">\n @for (stop of context.stops; track stop) {\n <div\n #stops\n class=\"t-stop\"\n [style.margin-top]=\"stop\"\n ></div>\n }\n</div>\n<div class=\"t-sheet\">\n @if (context.bar && !context.appearance.includes('fullscreen')) {\n <div class=\"t-top\"></div>\n }\n @if (context.label) {\n <h2\n class=\"t-heading\"\n [id]=\"context.id\"\n >\n <ng-container *polymorpheusOutlet=\"context.label as label; context: context\">\n {{ label }}\n </ng-container>\n </h2>\n }\n <div class=\"t-content\">\n <div\n *polymorpheusOutlet=\"context.content as text; context: context\"\n [innerHTML]=\"text\"\n ></div>\n </div>\n</div>\n", styles: [":host{scrollbar-width:none;-ms-overflow-style:none;display:flex;inline-size:100%;max-inline-size:40rem;block-size:calc(100% - max(var(--tui-offset),env(safe-area-inset-top)));flex-direction:column;font:var(--tui-font-text-m);overflow-y:scroll;scroll-snap-type:y mandatory;margin:max(var(--tui-offset),env(safe-area-inset-top)) auto 0;border-radius:.75rem .75rem 0 0}:host::-webkit-scrollbar,:host::-webkit-scrollbar-thumb{display:none}:host.tui-enter,:host.tui-leave{animation-name:tuiFade,tuiSlide}:host:before{position:absolute;top:0;left:0;inline-size:100%;block-size:100%;content:\"\";z-index:-1}:host._closeable{display:block}:host._closeable .t-stops{display:flex}:host._fullscreen,:host[data-appearance~=fullscreen]{display:block}:host._fullscreen .t-sheet,:host[data-appearance~=fullscreen] .t-sheet{display:flex;flex-direction:column;min-block-size:100%}:host._fullscreen .t-content,:host[data-appearance~=fullscreen] .t-content{display:flex;flex-direction:column;flex-grow:1}:host._fullscreen .t-content ::ng-deep>header,:host[data-appearance~=fullscreen] .t-content ::ng-deep>header,:host._fullscreen .t-content ::ng-deep>[tuiSlides]>*>header,:host[data-appearance~=fullscreen] .t-content ::ng-deep>[tuiSlides]>*>header,:host._fullscreen .t-content ::ng-deep>ng-component>header,:host[data-appearance~=fullscreen] .t-content ::ng-deep>ng-component>header,:host._fullscreen .t-content ::ng-deep>ng-component>[tuiSlides]>*>header,:host[data-appearance~=fullscreen] .t-content ::ng-deep>ng-component>[tuiSlides]>*>header{margin-block-end:1.5rem;font:var(--tui-font-heading-3)}:host._fullscreen .t-content ::ng-deep>header+p,:host[data-appearance~=fullscreen] .t-content ::ng-deep>header+p,:host._fullscreen .t-content ::ng-deep>[tuiSlides]>*>header+p,:host[data-appearance~=fullscreen] .t-content ::ng-deep>[tuiSlides]>*>header+p,:host._fullscreen .t-content ::ng-deep>ng-component>header+p,:host[data-appearance~=fullscreen] .t-content ::ng-deep>ng-component>header+p,:host._fullscreen .t-content ::ng-deep>ng-component>[tuiSlides]>*>header+p,:host[data-appearance~=fullscreen] .t-content ::ng-deep>ng-component>[tuiSlides]>*>header+p{margin:-.5rem 0 1.5rem}:host._fullscreen .t-content ::ng-deep>header:empty,:host[data-appearance~=fullscreen] .t-content ::ng-deep>header:empty,:host._fullscreen .t-content ::ng-deep>[tuiSlides]>*>header:empty,:host[data-appearance~=fullscreen] .t-content ::ng-deep>[tuiSlides]>*>header:empty,:host._fullscreen .t-content ::ng-deep>ng-component>header:empty,:host[data-appearance~=fullscreen] .t-content ::ng-deep>ng-component>header:empty,:host._fullscreen .t-content ::ng-deep>ng-component>[tuiSlides]>*>header:empty,:host[data-appearance~=fullscreen] .t-content ::ng-deep>ng-component>[tuiSlides]>*>header:empty{display:none}.t-stops{display:none;block-size:100%;scroll-snap-stop:always;scroll-snap-align:start;pointer-events:none}.t-stop{position:relative;top:env(safe-area-inset-bottom);scroll-snap-stop:normal;scroll-snap-align:start;block-size:1rem;inline-size:1rem}.t-sheet{scrollbar-width:none;-ms-overflow-style:none;inline-size:100%;box-shadow:var(--tui-shadow-small);border-radius:inherit;padding:0 1rem;margin-block-start:auto;background:var(--tui-background-elevation-1);box-sizing:border-box;scroll-snap-stop:always;scroll-snap-align:start}.t-sheet::-webkit-scrollbar,.t-sheet::-webkit-scrollbar-thumb{display:none}.t-top{position:sticky;top:0;z-index:1;block-size:1.5rem;margin:0 -1rem;border-radius:inherit;background:var(--tui-background-elevation-1)}.t-top:after{content:\"\";position:absolute;top:.5rem;left:50%;inline-size:2rem;block-size:.25rem;transform:translate(-50%);background:var(--tui-border-normal);border-radius:1rem}.t-heading{position:sticky;top:1.5rem;z-index:1;margin:0 -1rem;padding:.75rem 1rem;font:var(--tui-font-heading-6);background:var(--tui-background-elevation-1)}.t-heading:first-child{top:0;border-radius:inherit}.t-heading:last-child{padding-block-end:1.5rem}.t-content{position:relative;isolation:isolate;padding-block-end:max(1.5rem,env(safe-area-inset-bottom));border-radius:inherit}.t-content:after{content:\"\";position:relative;top:max(1.5rem,env(safe-area-inset-bottom));z-index:-1;display:block;scroll-snap-stop:always;scroll-snap-align:end;border-image:conic-gradient(var(--tui-background-elevation-1) 0 0) fill 0/0/0 100vh 100vh}\n"] }]
77
+ }, template: "<div class=\"t-stops\">\n @for (stop of context.stops; track stop) {\n <div\n #stops\n class=\"t-stop\"\n [style.margin-top]=\"stop\"\n ></div>\n }\n</div>\n<div class=\"t-sheet\">\n @if (context.bar && !context.appearance.includes('fullscreen')) {\n <div class=\"t-top\"></div>\n }\n @if (context.label) {\n <h2\n class=\"t-heading\"\n [id]=\"context.id\"\n >\n <ng-container *polymorpheusOutlet=\"context.label as label; context: context\">\n {{ label }}\n </ng-container>\n </h2>\n }\n <div class=\"t-content\">\n <div\n *polymorpheusOutlet=\"context.content as text; context: context\"\n [innerHTML]=\"text\"\n ></div>\n </div>\n</div>\n", styles: [":host{scrollbar-width:none;-ms-overflow-style:none;display:flex;inline-size:100%;max-inline-size:40rem;block-size:calc(100% - max(var(--tui-offset),env(safe-area-inset-top)));flex-direction:column;font:var(--tui-font-text-m);overflow-y:scroll;scroll-snap-type:y mandatory;margin:max(var(--tui-offset),env(safe-area-inset-top)) auto 0;border-radius:.75rem .75rem 0 0}:host::-webkit-scrollbar,:host::-webkit-scrollbar-thumb{display:none}:host.tui-enter,:host.tui-leave{animation-name:tuiFade,tuiSlide}:host:before{position:fixed;top:0;left:0;inline-size:100%;block-size:100%;content:\"\";z-index:-1}:host._closeable{display:block}:host._closeable .t-stops{display:flex}:host._fullscreen,:host[data-appearance~=fullscreen]{display:block}:host._fullscreen .t-sheet,:host[data-appearance~=fullscreen] .t-sheet{display:flex;flex-direction:column;min-block-size:100%}:host._fullscreen .t-content,:host[data-appearance~=fullscreen] .t-content{display:flex;flex-direction:column;flex-grow:1}:host._fullscreen .t-content ::ng-deep>header,:host[data-appearance~=fullscreen] .t-content ::ng-deep>header,:host._fullscreen .t-content ::ng-deep>[tuiSlides]>*>header,:host[data-appearance~=fullscreen] .t-content ::ng-deep>[tuiSlides]>*>header,:host._fullscreen .t-content ::ng-deep>ng-component>header,:host[data-appearance~=fullscreen] .t-content ::ng-deep>ng-component>header,:host._fullscreen .t-content ::ng-deep>ng-component>[tuiSlides]>*>header,:host[data-appearance~=fullscreen] .t-content ::ng-deep>ng-component>[tuiSlides]>*>header{margin-block-end:1.5rem;font:var(--tui-font-heading-3)}:host._fullscreen .t-content ::ng-deep>header+p,:host[data-appearance~=fullscreen] .t-content ::ng-deep>header+p,:host._fullscreen .t-content ::ng-deep>[tuiSlides]>*>header+p,:host[data-appearance~=fullscreen] .t-content ::ng-deep>[tuiSlides]>*>header+p,:host._fullscreen .t-content ::ng-deep>ng-component>header+p,:host[data-appearance~=fullscreen] .t-content ::ng-deep>ng-component>header+p,:host._fullscreen .t-content ::ng-deep>ng-component>[tuiSlides]>*>header+p,:host[data-appearance~=fullscreen] .t-content ::ng-deep>ng-component>[tuiSlides]>*>header+p{margin:-.5rem 0 1.5rem}:host._fullscreen .t-content ::ng-deep>header:empty,:host[data-appearance~=fullscreen] .t-content ::ng-deep>header:empty,:host._fullscreen .t-content ::ng-deep>[tuiSlides]>*>header:empty,:host[data-appearance~=fullscreen] .t-content ::ng-deep>[tuiSlides]>*>header:empty,:host._fullscreen .t-content ::ng-deep>ng-component>header:empty,:host[data-appearance~=fullscreen] .t-content ::ng-deep>ng-component>header:empty,:host._fullscreen .t-content ::ng-deep>ng-component>[tuiSlides]>*>header:empty,:host[data-appearance~=fullscreen] .t-content ::ng-deep>ng-component>[tuiSlides]>*>header:empty{display:none}:host ::ng-deep tui-data-list{margin-inline-start:calc(-1 * var(--tui-data-list-padding));margin-inline-end:calc(-1 * var(--tui-data-list-padding))}:host ::ng-deep tui-data-list [tuiOption]{margin-inline-start:calc(-1 * var(--t-option-padding-inline));margin-inline-end:calc(-1 * var(--t-option-padding-inline))}.t-stops{display:none;block-size:100%;scroll-snap-stop:always;scroll-snap-align:start;pointer-events:none}.t-stop{position:relative;top:env(safe-area-inset-bottom);scroll-snap-stop:normal;scroll-snap-align:start;block-size:1rem;inline-size:1rem}.t-sheet{scrollbar-width:none;-ms-overflow-style:none;inline-size:100%;box-shadow:var(--tui-shadow-small);border-radius:inherit;padding:0 1rem;margin-block-start:auto;background:var(--tui-background-elevation-1);box-sizing:border-box;scroll-snap-stop:always;scroll-snap-align:start}.t-sheet::-webkit-scrollbar,.t-sheet::-webkit-scrollbar-thumb{display:none}.t-top{position:sticky;top:0;z-index:1;block-size:1.5rem;margin:0 -1rem;border-radius:inherit;background:var(--tui-background-elevation-1)}.t-top:after{content:\"\";position:absolute;top:.5rem;left:50%;inline-size:2rem;block-size:.25rem;transform:translate(-50%);background:var(--tui-border-normal);border-radius:1rem}.t-heading{position:sticky;top:1.5rem;z-index:1;margin:0 -1rem;padding:.75rem 1rem;font:var(--tui-font-heading-6);background:var(--tui-background-elevation-1)}.t-heading:first-child{top:0;border-radius:inherit}.t-heading:last-child{padding-block-end:1.5rem}.t-content{position:relative;isolation:isolate;padding-block-end:max(1.5rem,env(safe-area-inset-bottom));border-radius:inherit}.t-content:after{content:\"\";position:relative;top:max(1.5rem,env(safe-area-inset-bottom));z-index:-1;display:block;scroll-snap-stop:always;scroll-snap-align:end;border-image:conic-gradient(var(--tui-background-elevation-1) 0 0) fill 0/0/0 100vh 100vh}\n"] }]
78
78
  }], propDecorators: { stops: [{
79
79
  type: ViewChildren,
80
80
  args: ['stops']
@@ -86,7 +86,7 @@ const TUI_SHEET_DIALOG_DEFAULT_OPTIONS = {
86
86
  stops: [],
87
87
  initial: 0,
88
88
  offset: 16,
89
- closeable: true,
89
+ closable: true,
90
90
  data: undefined,
91
91
  bar: true,
92
92
  fullscreen: false,
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-addon-mobile-components-sheet-dialog.mjs","sources":["../../../projects/addon-mobile/components/sheet-dialog/sheet-dialog.component.ts","../../../projects/addon-mobile/components/sheet-dialog/sheet-dialog.template.html","../../../projects/addon-mobile/components/sheet-dialog/sheet-dialog.options.ts","../../../projects/addon-mobile/components/sheet-dialog/sheet-dialog.service.ts","../../../projects/addon-mobile/components/sheet-dialog/sheet-dialog.directive.ts","../../../projects/addon-mobile/components/sheet-dialog/taiga-ui-addon-mobile-components-sheet-dialog.ts"],"sourcesContent":["import {\n type AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n type QueryList,\n ViewChildren,\n} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {EMPTY_QUERY} from '@taiga-ui/cdk/constants';\nimport {TuiAnimated} from '@taiga-ui/cdk/directives/animated';\nimport {tuiCloseWatcher, tuiZonefull} from '@taiga-ui/cdk/observables';\nimport {type TuiPopover} from '@taiga-ui/cdk/services';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {tuiProvide} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TUI_SCROLL_REF} from '@taiga-ui/core/tokens';\nimport {injectContext, PolymorpheusOutlet} from '@taiga-ui/polymorpheus';\nimport {exhaustMap, filter, isObservable, merge, of, Subject, take} from 'rxjs';\n\nimport {type TuiSheetDialogOptions} from './sheet-dialog.options';\n\nconst REQUIRED_ERROR = new Error(ngDevMode ? 'Required dialog was dismissed' : '');\n\n@Component({\n selector: 'tui-sheet-dialog',\n imports: [PolymorpheusOutlet],\n templateUrl: './sheet-dialog.template.html',\n styleUrls: ['./sheet-dialog.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [tuiProvide(TUI_SCROLL_REF, ElementRef)],\n hostDirectives: [TuiAnimated],\n host: {\n '[attr.data-appearance]': 'context.appearance',\n '[style.--tui-offset.px]': 'context.offset',\n '[class._closeable]': 'context.closeable',\n '[class._fullscreen]': 'context.fullscreen === true',\n '(document:touchstart.passive.zoneless)': 'onPointerChange(1)',\n '(document:touchend.zoneless)': 'onPointerChange(-1)',\n '(document:touchcancel.zoneless)': 'onPointerChange(-1)',\n '(scroll.zoneless)': 'onPointerChange(0)',\n '(click.self)': 'close$.next()',\n },\n})\nexport class TuiSheetDialogComponent<I> implements AfterViewInit {\n @ViewChildren('stops')\n private readonly stops: QueryList<ElementRef<HTMLElement>> = EMPTY_QUERY;\n\n private readonly el = tuiInjectElement();\n private pointers = 0;\n\n protected readonly context =\n injectContext<TuiPopover<TuiSheetDialogOptions<I>, any>>();\n\n protected readonly close$ = new Subject<void>();\n protected readonly $ = merge(this.close$, tuiCloseWatcher())\n .pipe(\n tuiZonefull(),\n exhaustMap(() => {\n if (isObservable(this.context.closeable)) {\n if (this.el.scrollTop <= 0) {\n this.el.scrollTo({top: this.initial, behavior: 'smooth'});\n }\n\n return this.context.closeable.pipe(take(1));\n }\n\n return of(this.context.closeable);\n }),\n filter(Boolean),\n takeUntilDestroyed(),\n )\n .subscribe(() => this.close());\n\n public ngAfterViewInit(): void {\n this.el.scrollTop = this.initial;\n }\n\n protected onPointerChange(delta: number): void {\n this.pointers = Math.max(this.pointers + delta, 0);\n\n if (!this.pointers && this.el.scrollTop <= 0) {\n this.close$.next();\n }\n }\n\n private get initial(): number {\n if (!this.context.closeable) {\n return 0;\n }\n\n return (\n this.stops\n .map((e) => e.nativeElement.offsetTop - this.context.offset)\n .concat(this.el.clientHeight ?? Infinity)[this.context.initial] ?? 0\n );\n }\n\n private close(): void {\n if (this.context.required) {\n this.context.$implicit.error(REQUIRED_ERROR);\n } else {\n this.context.$implicit.complete();\n }\n }\n}\n","<div class=\"t-stops\">\n @for (stop of context.stops; track stop) {\n <div\n #stops\n class=\"t-stop\"\n [style.margin-top]=\"stop\"\n ></div>\n }\n</div>\n<div class=\"t-sheet\">\n @if (context.bar && !context.appearance.includes('fullscreen')) {\n <div class=\"t-top\"></div>\n }\n @if (context.label) {\n <h2\n class=\"t-heading\"\n [id]=\"context.id\"\n >\n <ng-container *polymorpheusOutlet=\"context.label as label; context: context\">\n {{ label }}\n </ng-container>\n </h2>\n }\n <div class=\"t-content\">\n <div\n *polymorpheusOutlet=\"context.content as text; context: context\"\n [innerHTML]=\"text\"\n ></div>\n </div>\n</div>\n","import {InjectionToken, type Provider} from '@angular/core';\nimport {type TuiPopover} from '@taiga-ui/cdk/services';\nimport {tuiProvideOptions} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {type PolymorpheusContent} from '@taiga-ui/polymorpheus';\nimport {type Observable} from 'rxjs';\n\nexport interface TuiSheetDialogOptions<I = undefined> {\n readonly appearance: string;\n readonly closeable: Observable<boolean> | boolean;\n readonly data: I;\n readonly initial: number;\n readonly label: PolymorpheusContent<TuiPopover<TuiSheetDialogOptions<I>, any>>;\n readonly offset: number;\n readonly stops: readonly string[];\n readonly bar: boolean;\n /** @deprecated add 'fullscreen' in appearance string */\n readonly fullscreen: boolean;\n readonly required: boolean;\n}\n\nexport const TUI_SHEET_DIALOG_DEFAULT_OPTIONS: TuiSheetDialogOptions = {\n label: '',\n appearance: '',\n stops: [],\n initial: 0,\n offset: 16,\n closeable: true,\n data: undefined,\n bar: true,\n fullscreen: false,\n required: false,\n};\n\n/**\n * Default parameters for mobile dialog component\n */\nexport const TUI_SHEET_DIALOG_OPTIONS = new InjectionToken(\n ngDevMode ? 'TUI_SHEET_DIALOG_OPTIONS' : '',\n {\n factory: () => TUI_SHEET_DIALOG_DEFAULT_OPTIONS,\n },\n);\n\nexport function tuiSheetDialogOptionsProvider(\n options: Partial<TuiSheetDialogOptions>,\n): Provider {\n return tuiProvideOptions(\n TUI_SHEET_DIALOG_OPTIONS,\n options,\n TUI_SHEET_DIALOG_DEFAULT_OPTIONS,\n );\n}\n","import {inject, Injectable} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {TuiPopoverService, TuiThemeColorService} from '@taiga-ui/cdk/services';\nimport {TUI_DIALOGS} from '@taiga-ui/core/components/dialog';\nimport {pairwise, startWith} from 'rxjs';\n\nimport {TuiSheetDialogComponent} from './sheet-dialog.component';\nimport {\n TUI_SHEET_DIALOG_OPTIONS,\n type TuiSheetDialogOptions,\n} from './sheet-dialog.options';\n\nconst THEME = '#404040';\n\n@Injectable({\n providedIn: 'root',\n useFactory: () =>\n new TuiSheetDialogService(\n TUI_DIALOGS,\n TuiSheetDialogComponent,\n inject(TUI_SHEET_DIALOG_OPTIONS),\n ),\n})\nexport class TuiSheetDialogService extends TuiPopoverService<TuiSheetDialogOptions<any>> {\n private readonly theme = inject(TuiThemeColorService);\n private initial = this.theme.color;\n\n protected readonly $ = this.items$\n .pipe(startWith([]), pairwise(), takeUntilDestroyed())\n .subscribe(([prev, next]) => {\n if (!prev.length && next.length) {\n this.initial = this.theme.color;\n this.theme.color = THEME;\n }\n\n if (!next.length && prev.length) {\n this.theme.color = this.initial;\n }\n });\n}\n","import {Directive} from '@angular/core';\nimport {TuiPopoverDirective} from '@taiga-ui/cdk/directives/popover';\nimport {tuiAsPopover} from '@taiga-ui/cdk/services';\n\nimport {type TuiSheetDialogOptions} from './sheet-dialog.options';\nimport {TuiSheetDialogService} from './sheet-dialog.service';\n\n@Directive({\n standalone: true,\n selector: 'ng-template[tuiSheetDialog]',\n inputs: ['options: tuiSheetDialogOptions', 'open: tuiSheetDialog'],\n outputs: ['openChange: tuiSheetDialogChange'],\n providers: [tuiAsPopover(TuiSheetDialogService)],\n})\nexport class TuiSheetDialog extends TuiPopoverDirective<TuiSheetDialogOptions> {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAqBA,MAAM,cAAc,GAAG,IAAI,KAAK,CAAC,SAAS,GAAG,+BAA+B,GAAG,EAAE,CAAC;MAsBrE,uBAAuB,CAAA;AApBpC,IAAA,WAAA,GAAA;QAsBqB,IAAK,CAAA,KAAA,GAAuC,WAAW;QAEvD,IAAE,CAAA,EAAA,GAAG,gBAAgB,EAAE;QAChC,IAAQ,CAAA,QAAA,GAAG,CAAC;QAED,IAAO,CAAA,OAAA,GACtB,aAAa,EAA6C;AAE3C,QAAA,IAAA,CAAA,MAAM,GAAG,IAAI,OAAO,EAAQ;QAC5B,IAAC,CAAA,CAAA,GAAG,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,eAAe,EAAE;AACtD,aAAA,IAAI,CACD,WAAW,EAAE,EACb,UAAU,CAAC,MAAK;YACZ,IAAI,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE;gBACtC,IAAI,IAAI,CAAC,EAAE,CAAC,SAAS,IAAI,CAAC,EAAE;AACxB,oBAAA,IAAI,CAAC,EAAE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W,EACX,uBAAuB,EACvB,MAAM,CAAC,wBAAwB,CAAC,CACnC,EAAA,CAAA,CAAA;;4FAEI,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBATjC,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,UAAU,EAAE,MAAM;AAClB,oBAAA,UAAU,EAAE,MACR,IACI,qBAAA,CAAA,WAAW,EACX,uBAAuB,EACvB,MAAM,CAAC,wBAAwB,CAAC,CACnC;AACR,iBAAA;;;ACRK,MAAO,cAAe,SAAQ,mBAA0C,CAAA;+GAAjE,cAAc,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAd,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,cAAc,wNAFZ,CAAC,YAAY,CAAC,qBAAqB,CAAC,CAAC,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAEvC,cAAc,EAAA,UAAA,EAAA,CAAA;kBAP1B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,6BAA6B;AACvC,oBAAA,MAAM,EAAE,CAAC,gCAAgC,EAAE,sBAAsB,CAAC;oBAClE,OAAO,EAAE,CAAC,kCAAkC,CAAC;AAC7C,oBAAA,SAAS,EAAE,CAAC,YAAY,CAAC,qBAAqB,CAAC,CAAC;AACnD,iBAAA;;;ACbD;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-addon-mobile-components-sheet-dialog.mjs","sources":["../../../projects/addon-mobile/components/sheet-dialog/sheet-dialog.component.ts","../../../projects/addon-mobile/components/sheet-dialog/sheet-dialog.template.html","../../../projects/addon-mobile/components/sheet-dialog/sheet-dialog.options.ts","../../../projects/addon-mobile/components/sheet-dialog/sheet-dialog.service.ts","../../../projects/addon-mobile/components/sheet-dialog/sheet-dialog.directive.ts","../../../projects/addon-mobile/components/sheet-dialog/taiga-ui-addon-mobile-components-sheet-dialog.ts"],"sourcesContent":["import {\n type AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n inject,\n type QueryList,\n ViewChildren,\n} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {EMPTY_QUERY, TUI_TRUE_HANDLER} from '@taiga-ui/cdk/constants';\nimport {TuiAnimated} from '@taiga-ui/cdk/directives/animated';\nimport {tuiCloseWatcher, tuiZonefull} from '@taiga-ui/cdk/observables';\nimport {type TuiPopover} from '@taiga-ui/cdk/services';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {tuiProvide} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TUI_DIALOGS_CLOSE} from '@taiga-ui/core/components/dialog';\nimport {TUI_SCROLL_REF} from '@taiga-ui/core/tokens';\nimport {injectContext, PolymorpheusOutlet} from '@taiga-ui/polymorpheus';\nimport {exhaustMap, filter, isObservable, map, merge, of, Subject, take} from 'rxjs';\n\nimport {type TuiSheetDialogOptions} from './sheet-dialog.options';\n\nconst REQUIRED_ERROR = new Error(ngDevMode ? 'Required dialog was dismissed' : '');\n\n@Component({\n selector: 'tui-sheet-dialog',\n imports: [PolymorpheusOutlet],\n templateUrl: './sheet-dialog.template.html',\n styleUrls: ['./sheet-dialog.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [tuiProvide(TUI_SCROLL_REF, ElementRef)],\n hostDirectives: [TuiAnimated],\n host: {\n '[attr.data-appearance]': 'context.appearance',\n '[style.--tui-offset.px]': 'context.offset',\n '[class._closeable]': 'context.closable',\n '[class._fullscreen]': 'context.fullscreen === true',\n '(document:touchstart.passive.zoneless)': 'onPointerChange(1)',\n '(document:touchend.zoneless)': 'onPointerChange(-1)',\n '(document:touchcancel.zoneless)': 'onPointerChange(-1)',\n '(scroll.zoneless)': 'onPointerChange(0)',\n '(click.self)': 'close$.next()',\n },\n})\nexport class TuiSheetDialogComponent<I> implements AfterViewInit {\n @ViewChildren('stops')\n private readonly stops: QueryList<ElementRef<HTMLElement>> = EMPTY_QUERY;\n\n private readonly el = tuiInjectElement();\n private pointers = 0;\n\n protected readonly context =\n injectContext<TuiPopover<TuiSheetDialogOptions<I>, any>>();\n\n protected readonly close$ = new Subject<void>();\n protected readonly $ = merge(\n this.close$,\n tuiCloseWatcher(),\n inject(TUI_DIALOGS_CLOSE).pipe(map(TUI_TRUE_HANDLER)),\n )\n .pipe(\n tuiZonefull(),\n exhaustMap(() => {\n if (isObservable(this.context.closable)) {\n if (this.el.scrollTop <= 0) {\n this.el.scrollTo({top: this.initial, behavior: 'smooth'});\n }\n\n return this.context.closable.pipe(take(1));\n }\n\n return of(this.context.closable);\n }),\n filter(Boolean),\n takeUntilDestroyed(),\n )\n .subscribe(() => this.close());\n\n public ngAfterViewInit(): void {\n this.el.scrollTop = this.initial;\n }\n\n protected onPointerChange(delta: number): void {\n this.pointers = Math.max(this.pointers + delta, 0);\n\n if (!this.pointers && this.el.scrollTop <= 0) {\n this.close$.next();\n }\n }\n\n private get initial(): number {\n if (!this.context.closable) {\n return 0;\n }\n\n return (\n this.stops\n .map((e) => e.nativeElement.offsetTop - this.context.offset)\n .concat(this.el.clientHeight ?? Infinity)[this.context.initial] ?? 0\n );\n }\n\n private close(): void {\n if (this.context.required) {\n this.context.$implicit.error(REQUIRED_ERROR);\n } else {\n this.context.$implicit.complete();\n }\n }\n}\n","<div class=\"t-stops\">\n @for (stop of context.stops; track stop) {\n <div\n #stops\n class=\"t-stop\"\n [style.margin-top]=\"stop\"\n ></div>\n }\n</div>\n<div class=\"t-sheet\">\n @if (context.bar && !context.appearance.includes('fullscreen')) {\n <div class=\"t-top\"></div>\n }\n @if (context.label) {\n <h2\n class=\"t-heading\"\n [id]=\"context.id\"\n >\n <ng-container *polymorpheusOutlet=\"context.label as label; context: context\">\n {{ label }}\n </ng-container>\n </h2>\n }\n <div class=\"t-content\">\n <div\n *polymorpheusOutlet=\"context.content as text; context: context\"\n [innerHTML]=\"text\"\n ></div>\n </div>\n</div>\n","import {InjectionToken, type Provider} from '@angular/core';\nimport {type TuiPopover} from '@taiga-ui/cdk/services';\nimport {tuiProvideOptions} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {type PolymorpheusContent} from '@taiga-ui/polymorpheus';\nimport {type Observable} from 'rxjs';\n\nexport interface TuiSheetDialogOptions<I = undefined> {\n readonly appearance: string;\n readonly closable: Observable<boolean> | boolean;\n readonly data: I;\n readonly initial: number;\n readonly label: PolymorpheusContent<TuiPopover<TuiSheetDialogOptions<I>, any>>;\n readonly offset: number;\n readonly stops: readonly string[];\n readonly bar: boolean;\n /** @deprecated add 'fullscreen' in appearance string */\n readonly fullscreen: boolean;\n readonly required: boolean;\n}\n\nexport const TUI_SHEET_DIALOG_DEFAULT_OPTIONS: TuiSheetDialogOptions = {\n label: '',\n appearance: '',\n stops: [],\n initial: 0,\n offset: 16,\n closable: true,\n data: undefined,\n bar: true,\n fullscreen: false,\n required: false,\n};\n\n/**\n * Default parameters for mobile dialog component\n */\nexport const TUI_SHEET_DIALOG_OPTIONS = new InjectionToken(\n ngDevMode ? 'TUI_SHEET_DIALOG_OPTIONS' : '',\n {\n factory: () => TUI_SHEET_DIALOG_DEFAULT_OPTIONS,\n },\n);\n\nexport function tuiSheetDialogOptionsProvider(\n options: Partial<TuiSheetDialogOptions>,\n): Provider {\n return tuiProvideOptions(\n TUI_SHEET_DIALOG_OPTIONS,\n options,\n TUI_SHEET_DIALOG_DEFAULT_OPTIONS,\n );\n}\n","import {inject, Injectable} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {TuiPopoverService, TuiThemeColorService} from '@taiga-ui/cdk/services';\nimport {TUI_DIALOGS} from '@taiga-ui/core/components/dialog';\nimport {pairwise, startWith} from 'rxjs';\n\nimport {TuiSheetDialogComponent} from './sheet-dialog.component';\nimport {\n TUI_SHEET_DIALOG_OPTIONS,\n type TuiSheetDialogOptions,\n} from './sheet-dialog.options';\n\nconst THEME = '#404040';\n\n@Injectable({\n providedIn: 'root',\n useFactory: () =>\n new TuiSheetDialogService(\n TUI_DIALOGS,\n TuiSheetDialogComponent,\n inject(TUI_SHEET_DIALOG_OPTIONS),\n ),\n})\nexport class TuiSheetDialogService extends TuiPopoverService<TuiSheetDialogOptions<any>> {\n private readonly theme = inject(TuiThemeColorService);\n private initial = this.theme.color;\n\n protected readonly $ = this.items$\n .pipe(startWith([]), pairwise(), takeUntilDestroyed())\n .subscribe(([prev, next]) => {\n if (!prev.length && next.length) {\n this.initial = this.theme.color;\n this.theme.color = THEME;\n }\n\n if (!next.length && prev.length) {\n this.theme.color = this.initial;\n }\n });\n}\n","import {Directive} from '@angular/core';\nimport {TuiPopoverDirective} from '@taiga-ui/cdk/directives/popover';\nimport {tuiAsPopover} from '@taiga-ui/cdk/services';\n\nimport {type TuiSheetDialogOptions} from './sheet-dialog.options';\nimport {TuiSheetDialogService} from './sheet-dialog.service';\n\n@Directive({\n standalone: true,\n selector: 'ng-template[tuiSheetDialog]',\n inputs: ['options: tuiSheetDialogOptions', 'open: tuiSheetDialog'],\n outputs: ['openChange: tuiSheetDialogChange'],\n providers: [tuiAsPopover(TuiSheetDialogService)],\n})\nexport class TuiSheetDialog extends TuiPopoverDirective<TuiSheetDialogOptions> {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAuBA,MAAM,cAAc,GAAG,IAAI,KAAK,CAAC,SAAS,GAAG,+BAA+B,GAAG,EAAE,CAAC;MAsBrE,uBAAuB,CAAA;AApBpC,IAAA,WAAA,GAAA;QAsBqB,IAAK,CAAA,KAAA,GAAuC,WAAW;QAEvD,IAAE,CAAA,EAAA,GAAG,gBAAgB,EAAE;QAChC,IAA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