@taiga-ui/cdk 3.34.0 → 3.35.0-dev.main-3cbddaa
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/abstract/dialog.directive.d.ts +4 -3
- package/bundles/taiga-ui-cdk-abstract.umd.js +6 -9
- package/bundles/taiga-ui-cdk-abstract.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-constants.umd.js +1 -1
- package/bundles/taiga-ui-cdk-constants.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-enums.umd.js +4 -0
- package/bundles/taiga-ui-cdk-enums.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-observables.umd.js +2 -0
- package/bundles/taiga-ui-cdk-observables.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-services.umd.js +8 -3
- package/bundles/taiga-ui-cdk-services.umd.js.map +1 -1
- package/bundles/taiga-ui-cdk-utils-miscellaneous.umd.js.map +1 -1
- package/constants/version.d.ts +1 -1
- package/constants/version.js +1 -1
- package/esm2015/abstract/dialog.directive.js +8 -7
- package/esm2015/constants/version.js +2 -2
- package/esm2015/enums/day-of-week.js +3 -1
- package/esm2015/enums/month-number.js +3 -1
- package/esm2015/observables/drag-and-drop-from.js +3 -1
- package/esm2015/services/static-request.service.js +7 -2
- package/esm2015/types/index.js +2 -1
- package/esm2015/types/values-of.js +2 -0
- package/esm2015/utils/miscellaneous/uniq-by.js +1 -1
- package/fesm2015/taiga-ui-cdk-abstract.js +5 -4
- package/fesm2015/taiga-ui-cdk-abstract.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-constants.js +1 -1
- package/fesm2015/taiga-ui-cdk-constants.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-enums.js +4 -0
- package/fesm2015/taiga-ui-cdk-enums.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-observables.js +2 -0
- package/fesm2015/taiga-ui-cdk-observables.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-services.js +6 -1
- package/fesm2015/taiga-ui-cdk-services.js.map +1 -1
- package/fesm2015/taiga-ui-cdk-utils-miscellaneous.js.map +1 -1
- package/package.json +5 -5
- package/schematics/migration.json +6 -1
- package/schematics/ng-add/steps/add-taiga-modules.js +9 -1
- package/schematics/ng-update/v3-30/constants/icons.js +1 -1
- package/schematics/ng-update/v3-30/index.js +2 -2
- package/schematics/ng-update/v3-35/constants/constants.d.ts +2 -0
- package/schematics/ng-update/v3-35/constants/constants.js +8 -0
- package/schematics/ng-update/v3-35/constants/icons.d.ts +4 -0
- package/schematics/ng-update/v3-35/constants/icons.js +2357 -0
- package/schematics/ng-update/v3-35/index.d.ts +3 -0
- package/schematics/ng-update/v3-35/index.js +33 -0
- package/types/index.d.ts +1 -0
- package/types/values-of.d.ts +1 -0
- /package/schematics/ng-update/{v3-30/steps → steps/icons}/replace-imports.d.ts +0 -0
- /package/schematics/ng-update/{v3-30/steps → steps/icons}/replace-imports.js +0 -0
- /package/schematics/ng-update/{v3-30/steps → steps/icons}/replace-text.d.ts +0 -0
- /package/schematics/ng-update/{v3-30/steps → steps/icons}/replace-text.js +0 -0
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"taiga-ui-cdk-abstract.js","sources":["../../../projects/cdk/abstract/interactive.ts","../../../projects/cdk/abstract/value-transformer.ts","../../../projects/cdk/abstract/control.ts","../../../projects/cdk/abstract/controller.ts","../../../projects/cdk/abstract/dialog.service.ts","../../../projects/cdk/abstract/dialog.directive.ts","../../../projects/cdk/abstract/multiple-control.ts","../../../projects/cdk/abstract/nullable-control.ts","../../../projects/cdk/abstract/portal-service.ts","../../../projects/cdk/abstract/portal-host.ts","../../../projects/cdk/abstract/theme-switcher.ts","../../../projects/cdk/abstract/taiga-ui-cdk-abstract.ts"],"sourcesContent":["import {Directive, EventEmitter, HostBinding, Input, Output} from '@angular/core';\n\nconst TUI = `tui_interactive_`;\n\n/**\n * The most basic class for interactive components\n */\n@Directive()\nexport abstract class AbstractTuiInteractive {\n private static autoId = 0;\n\n abstract disabled: boolean;\n\n abstract focused: boolean;\n\n private readonly autoIdString: string;\n\n @Input()\n pseudoHover: boolean | null = null;\n\n @Input()\n pseudoActive: boolean | null = null;\n\n @Input()\n pseudoFocus: boolean | null = null;\n\n /**\n * Determines if component is focusable with keyboard.\n */\n @Input()\n focusable = true;\n\n @Input()\n nativeId = ``;\n\n /**\n * Emits 'true' on focus and 'false' on blur.\n */\n @Output()\n readonly focusedChange = new EventEmitter<boolean>();\n\n @Output()\n readonly focusVisibleChange = new EventEmitter<boolean>();\n\n focusVisible = false;\n\n constructor() {\n this.autoIdString = `${TUI}${AbstractTuiInteractive.autoId++}${Date.now()}`;\n }\n\n @HostBinding(`class._disabled`)\n get computedDisabled(): boolean {\n return this.disabled;\n }\n\n get computedFocusable(): boolean {\n return !this.computedDisabled && (this.focusable || this.focused);\n }\n\n @HostBinding(`class._focused`)\n get computedFocused(): boolean {\n return !this.computedDisabled && (this.pseudoFocus ?? this.focused);\n }\n\n @HostBinding(`class._focus-visible`)\n get computedFocusVisible(): boolean {\n return !this.computedDisabled && (this.pseudoFocus ?? this.focusVisible);\n }\n\n // TODO: 3.0 Consider removing since native input is exposed\n get id(): string {\n return this.nativeId || this.autoIdString;\n }\n\n protected updateFocused(focused: boolean): void {\n this.focusedChange.emit(focused);\n }\n\n protected updateFocusVisible(focusVisible: boolean): void {\n if (this.focusVisible === focusVisible) {\n return;\n }\n\n this.focusVisible = focusVisible;\n this.focusVisibleChange.emit(focusVisible);\n }\n}\n","export abstract class AbstractTuiValueTransformer<From, To = unknown> {\n abstract toControlValue(componentValue: From): To;\n abstract fromControlValue(controlValue: To): From;\n}\n","import {\n ChangeDetectorRef,\n Directive,\n HostBinding,\n Inject,\n Input,\n OnDestroy,\n OnInit,\n Optional,\n Provider,\n Type,\n} from '@angular/core';\nimport {AbstractControl, ControlValueAccessor, NgControl, NgModel} from '@angular/forms';\nimport {tuiAssert} from '@taiga-ui/cdk/classes';\nimport {EMPTY_FUNCTION} from '@taiga-ui/cdk/constants';\nimport {TuiControlValueTransformer} from '@taiga-ui/cdk/interfaces';\nimport {tuiIsPresent} from '@taiga-ui/cdk/utils';\nimport {merge, Subject} from 'rxjs';\nimport {\n delay,\n distinctUntilChanged,\n filter,\n map,\n startWith,\n switchMap,\n takeUntil,\n} from 'rxjs/operators';\n\nimport {AbstractTuiInteractive} from './interactive';\nimport {AbstractTuiValueTransformer} from './value-transformer';\n\n/**\n * Basic ControlValueAccessor class to build form components upon\n */\n@Directive()\nexport abstract class AbstractTuiControl<T>\n extends AbstractTuiInteractive\n implements OnDestroy, OnInit, ControlValueAccessor\n{\n private previousInternalValue?: T | null;\n private readonly refresh$ = new Subject();\n\n private onTouched = EMPTY_FUNCTION;\n\n private onChange = EMPTY_FUNCTION;\n\n protected readonly fallbackValue = this.getFallbackValue();\n\n protected readonly destroy$ = new Subject<void>();\n\n @Input()\n @HostBinding(`class._readonly`)\n readOnly = false;\n\n @Input()\n pseudoInvalid: boolean | null = null;\n\n constructor(\n @Optional()\n private readonly ngControl: NgControl | null,\n protected readonly cdr: ChangeDetectorRef,\n @Optional()\n @Inject(AbstractTuiValueTransformer)\n protected readonly valueTransformer?: TuiControlValueTransformer<T> | null,\n ) {\n super();\n\n if (ngDevMode && this.ngControl === null) {\n tuiAssert.assert(\n false,\n `NgControl not injected in ${this.constructor.name}!\\n`,\n `Use [(ngModel)] or [formControl] or formControlName for correct work.`,\n );\n }\n\n if (this.ngControl) {\n this.ngControl.valueAccessor = this;\n }\n }\n\n protected abstract getFallbackValue(): T;\n\n @HostBinding(`class._invalid`)\n get computedInvalid(): boolean {\n return (\n this.interactive &&\n (this.pseudoInvalid !== null\n ? this.pseudoInvalid\n : this.touched && this.invalid)\n );\n }\n\n get value(): T {\n return this.previousInternalValue ?? this.fallbackValue;\n }\n\n set value(value: T) {\n this.updateValue(value);\n }\n\n get safeCurrentValue(): T {\n return this.rawValue ?? this.fallbackValue;\n }\n\n get invalid(): boolean {\n return this.safeNgControlData<boolean>(({invalid}) => invalid, false);\n }\n\n get valid(): boolean {\n return this.safeNgControlData<boolean>(({valid}) => valid, false);\n }\n\n get touched(): boolean {\n return this.safeNgControlData<boolean>(({touched}) => touched, false);\n }\n\n get disabled(): boolean {\n return this.safeNgControlData<boolean>(({disabled}) => disabled, false);\n }\n\n get interactive(): boolean {\n return !this.readOnly && !this.computedDisabled;\n }\n\n get control(): AbstractControl | null {\n return this.safeNgControlData<AbstractControl | null>(\n ({control}) => control,\n null,\n );\n }\n\n get computedName(): string | null {\n return this.controlName?.toString() ?? null;\n }\n\n protected get controlName(): string | null {\n return this.ngControl?.name?.toString() ?? null;\n }\n\n private get rawValue(): T | undefined {\n const {ngControl} = this;\n\n if (ngControl === null) {\n return undefined;\n }\n\n const controlValue =\n ngControl instanceof NgModel && this.previousInternalValue === undefined\n ? ngControl.viewModel\n : ngControl.value;\n\n return this.fromControlValue(controlValue);\n }\n\n ngOnInit(): void {\n this.refresh$\n .pipe(\n delay(0),\n startWith(null),\n map(() => this.ngControl?.control),\n filter(tuiIsPresent),\n distinctUntilChanged(),\n switchMap(control => merge(control.valueChanges, control.statusChanges)),\n takeUntil(this.destroy$),\n )\n .subscribe(() => {\n this.refreshLocalValue(this.safeCurrentValue);\n });\n }\n\n ngOnDestroy(): void {\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n checkControlUpdate(): void {\n this.cdr.markForCheck();\n }\n\n registerOnChange(onChange: (value: T | unknown) => void): void {\n this.onChange = (componentValue: T) => {\n onChange(this.toControlValue(componentValue));\n };\n\n this.refresh$.next();\n }\n\n registerOnTouched(onTouched: () => void): void {\n this.onTouched = onTouched;\n }\n\n setDisabledState(): void {\n this.checkControlUpdate();\n }\n\n writeValue(value: T | null): void {\n const controlValue =\n this.ngControl instanceof NgModel && this.previousInternalValue === undefined\n ? this.ngControl.model\n : value;\n\n this.refreshLocalValue(this.fromControlValue(controlValue));\n }\n\n protected override updateFocused(focused: boolean): void {\n if (!focused) {\n this.controlMarkAsTouched();\n }\n\n super.updateFocused(focused);\n }\n\n /**\n * @deprecated use `value` setter\n */\n protected updateValue(value: T): void {\n if (this.disabled || this.valueIdenticalComparator(this.value, value)) {\n return;\n }\n\n this.previousInternalValue = value;\n this.controlSetValue(value);\n }\n\n protected valueIdenticalComparator(oldValue: T, newValue: T): boolean {\n return oldValue === newValue;\n }\n\n private safeNgControlData<T>(\n extractor: (ngControl: NgControl) => T | null | undefined,\n defaultFieldValue: T,\n ): T {\n return (this.ngControl && extractor(this.ngControl)) ?? defaultFieldValue;\n }\n\n private controlMarkAsTouched(): void {\n this.onTouched();\n this.checkControlUpdate();\n }\n\n private controlSetValue(value: T): void {\n this.onChange(value);\n this.checkControlUpdate();\n }\n\n private refreshLocalValue(value: T | null): void {\n this.previousInternalValue = value;\n this.checkControlUpdate();\n }\n\n private fromControlValue(controlValue: unknown): T {\n return this.valueTransformer\n ? this.valueTransformer.fromControlValue(controlValue)\n : (controlValue as T);\n }\n\n private toControlValue(componentValue: T): unknown {\n return this.valueTransformer\n ? this.valueTransformer.toControlValue(componentValue)\n : componentValue;\n }\n}\n\nexport function tuiAsControl<T>(useExisting: Type<AbstractTuiControl<T>>): Provider {\n return {\n provide: AbstractTuiControl,\n useExisting,\n };\n}\n","import {Directive, OnChanges} from '@angular/core';\nimport {Subject} from 'rxjs';\n\n@Directive()\nexport abstract class AbstractTuiController implements OnChanges {\n readonly change$ = new Subject<void>();\n\n ngOnChanges(): void {\n this.change$.next();\n }\n}\n","import {Inject, Injectable} from '@angular/core';\nimport {TuiBaseDialogContext} from '@taiga-ui/cdk/interfaces';\nimport {TuiIdService} from '@taiga-ui/cdk/services';\nimport {TuiDialog} from '@taiga-ui/cdk/types';\nimport {PolymorpheusComponent, PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\nimport {BehaviorSubject, Observable} from 'rxjs';\n\n@Injectable()\nexport abstract class AbstractTuiDialogService<T, K = void> extends Observable<\n ReadonlyArray<TuiDialog<T, any>>\n> {\n protected abstract readonly component: PolymorpheusComponent<any, TuiDialog<T, any>>;\n\n protected abstract readonly defaultOptions: T;\n\n protected readonly dialogs$ = new BehaviorSubject<ReadonlyArray<TuiDialog<T, any>>>(\n [],\n );\n\n constructor(@Inject(TuiIdService) private readonly idService: TuiIdService) {\n super(observer => this.dialogs$.subscribe(observer));\n }\n\n open<G = void>(\n content: PolymorpheusContent<T & TuiBaseDialogContext<K extends void ? G : K>>,\n options: Partial<T> = {},\n ): Observable<K extends void ? G : K> {\n return new Observable(observer => {\n const completeWith = (result: K extends void ? G : K): void => {\n observer.next(result);\n observer.complete();\n };\n const dialog = {\n ...this.defaultOptions,\n ...options,\n content,\n completeWith,\n $implicit: observer,\n component: this.component,\n createdAt: Date.now(),\n id: this.idService.generate(),\n };\n\n this.dialogs$.next([...this.dialogs$.value, dialog]);\n\n return () => {\n this.dialogs$.next(this.dialogs$.value.filter(item => item !== dialog));\n };\n });\n }\n}\n","import {ChangeDetectorRef, Directive, Inject, TemplateRef} from '@angular/core';\nimport {tuiIfMap} from '@taiga-ui/cdk/observables';\nimport {TuiDialog} from '@taiga-ui/cdk/types';\nimport {PolymorpheusTemplate} from '@tinkoff/ng-polymorpheus';\nimport {Subject} from 'rxjs';\nimport {endWith, ignoreElements, share} from 'rxjs/operators';\n\nimport {AbstractTuiDialogService} from './dialog.service';\n\n@Directive()\nexport abstract class AbstractTuiDialogDirective<T> extends PolymorpheusTemplate<\n TuiDialog<T, void>\n> {\n private readonly open$ = new Subject<boolean>();\n\n options: Partial<T> = {};\n\n set open(open: boolean) {\n this.open$.next(open);\n }\n\n openChange = this.open$.pipe(\n tuiIfMap(() =>\n this.service.open(this, this.options).pipe(ignoreElements(), endWith(false)),\n ),\n share(),\n );\n\n constructor(\n @Inject(TemplateRef)\n templateRef: TemplateRef<TuiDialog<T, void>>,\n @Inject(ChangeDetectorRef) cdr: ChangeDetectorRef,\n @Inject(AbstractTuiDialogService)\n private readonly service: AbstractTuiDialogService<T>,\n ) {\n super(templateRef, cdr);\n }\n}\n","import {Directive} from '@angular/core';\n\nimport {AbstractTuiControl} from './control';\n\n@Directive()\nexport abstract class AbstractTuiMultipleControl<T> extends AbstractTuiControl<\n readonly T[]\n> {\n clear(): void {\n this.value = [];\n }\n\n protected getFallbackValue(): readonly T[] {\n return [];\n }\n}\n","import {Directive} from '@angular/core';\n\nimport {AbstractTuiControl} from './control';\n\n@Directive()\nexport abstract class AbstractTuiNullableControl<T> extends AbstractTuiControl<T | null> {\n protected getFallbackValue(): T | null {\n return null;\n }\n}\n","import {ComponentRef, EmbeddedViewRef, Injectable, TemplateRef} from '@angular/core';\nimport {TuiNoHostException} from '@taiga-ui/cdk/exceptions';\nimport {PolymorpheusComponent} from '@tinkoff/ng-polymorpheus';\n\nimport {AbstractTuiPortalHostComponent} from './portal-host';\n\n/**\n * Abstract service for displaying portals\n */\n@Injectable()\nexport abstract class AbstractTuiPortalService {\n protected host?: AbstractTuiPortalHostComponent;\n\n protected get safeHost(): AbstractTuiPortalHostComponent {\n if (!this.host) {\n throw new TuiNoHostException();\n }\n\n return this.host;\n }\n\n attach(host: AbstractTuiPortalHostComponent): void {\n this.host = host;\n }\n\n add<C>(component: PolymorpheusComponent<C>): ComponentRef<C> {\n return this.safeHost.addComponentChild(component);\n }\n\n remove<C>({hostView}: ComponentRef<C>): void {\n hostView.destroy();\n }\n\n addTemplate<C>(templateRef: TemplateRef<C>, context?: C): EmbeddedViewRef<C> {\n return this.safeHost.addTemplateChild(templateRef, context);\n }\n\n removeTemplate<C>(viewRef: EmbeddedViewRef<C>): void {\n viewRef.destroy();\n }\n}\n","import {\n ComponentFactoryResolver,\n ComponentRef,\n Directive,\n ElementRef,\n EmbeddedViewRef,\n Inject,\n INJECTOR,\n Injector,\n TemplateRef,\n ViewChild,\n ViewContainerRef,\n} from '@angular/core';\nimport {PolymorpheusComponent} from '@tinkoff/ng-polymorpheus';\n\nimport {AbstractTuiPortalService} from './portal-service';\n\n/**\n * Abstract class for host element for dynamically created portals.\n */\n@Directive()\nexport abstract class AbstractTuiPortalHostComponent {\n @ViewChild(`viewContainer`, {read: ViewContainerRef})\n private readonly vcr!: ViewContainerRef;\n\n constructor(\n @Inject(INJECTOR) private readonly injector: Injector,\n @Inject(ElementRef) private readonly el: ElementRef<HTMLElement>,\n @Inject(AbstractTuiPortalService) portalService: AbstractTuiPortalService,\n ) {\n portalService.attach(this);\n }\n\n get clientRect(): ClientRect {\n return this.el.nativeElement.getBoundingClientRect();\n }\n\n addComponentChild<C>(component: PolymorpheusComponent<C>): ComponentRef<C> {\n const parent = component.createInjector(this.injector);\n const resolver = parent.get(ComponentFactoryResolver);\n const factory = resolver.resolveComponentFactory(component.component);\n const providers = [{provide: AbstractTuiPortalHostComponent, useValue: this}];\n const injector = Injector.create({parent, providers});\n const ref = this.vcr.createComponent(factory, undefined, injector);\n\n ref.changeDetectorRef.detectChanges();\n\n return ref;\n }\n\n addTemplateChild<C>(templateRef: TemplateRef<C>, context?: C): EmbeddedViewRef<C> {\n return this.vcr.createEmbeddedView(templateRef, context);\n }\n}\n","import {DOCUMENT} from '@angular/common';\nimport {Directive, Inject, OnDestroy} from '@angular/core';\n\n/**\n * Use this abstract class to create your own toggleable themes.\n * A component extending this class must have CSS variables definitions\n * and have ViewEncapsulation set to NONE. A boolean input allows to\n * switch theme on or off.\n */\n@Directive()\nexport abstract class AbstractTuiThemeSwitcher implements OnDestroy {\n static style: HTMLStyleElement | null = null;\n\n constructor(@Inject(DOCUMENT) private readonly doc: Document) {\n if (this.style !== null) {\n this.addTheme();\n\n return;\n }\n\n const styles = this.doc.head.querySelectorAll(`style`);\n\n (this.constructor as typeof AbstractTuiThemeSwitcher).style =\n styles[styles.length - 1];\n }\n\n get style(): HTMLStyleElement | null {\n return (this.constructor as typeof AbstractTuiThemeSwitcher).style;\n }\n\n ngOnDestroy(): void {\n this.removeTheme();\n }\n\n private addTheme(): void {\n if (this.style) {\n this.doc.head.appendChild(this.style);\n }\n }\n\n private removeTheme(): void {\n if (this.style && this.doc.head.contains(this.style)) {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A,CAAA,SAAA,EAAA,CAAA,CAAA;0GAHV,wBAAwB,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;4FAAxB,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBAD7C,SAAS;0DAI8C,QAAQ,EAAA,UAAA,EAAA,CAAA;0BAA/C,MAAM;2BAAC,QAAQ,CAAA;;;ACbhC;;AAEG;;;;"}
|
1
|
+
{"version":3,"file":"taiga-ui-cdk-abstract.js","sources":["../../../projects/cdk/abstract/interactive.ts","../../../projects/cdk/abstract/value-transformer.ts","../../../projects/cdk/abstract/control.ts","../../../projects/cdk/abstract/controller.ts","../../../projects/cdk/abstract/dialog.service.ts","../../../projects/cdk/abstract/dialog.directive.ts","../../../projects/cdk/abstract/multiple-control.ts","../../../projects/cdk/abstract/nullable-control.ts","../../../projects/cdk/abstract/portal-service.ts","../../../projects/cdk/abstract/portal-host.ts","../../../projects/cdk/abstract/theme-switcher.ts","../../../projects/cdk/abstract/taiga-ui-cdk-abstract.ts"],"sourcesContent":["import {Directive, EventEmitter, HostBinding, Input, Output} from '@angular/core';\n\nconst TUI = `tui_interactive_`;\n\n/**\n * The most basic class for interactive components\n */\n@Directive()\nexport abstract class AbstractTuiInteractive {\n private static autoId = 0;\n\n abstract disabled: boolean;\n\n abstract focused: boolean;\n\n private readonly autoIdString: string;\n\n @Input()\n pseudoHover: boolean | null = null;\n\n @Input()\n pseudoActive: boolean | null = null;\n\n @Input()\n pseudoFocus: boolean | null = null;\n\n /**\n * Determines if component is focusable with keyboard.\n */\n @Input()\n focusable = true;\n\n @Input()\n nativeId = ``;\n\n /**\n * Emits 'true' on focus and 'false' on blur.\n */\n @Output()\n readonly focusedChange = new EventEmitter<boolean>();\n\n @Output()\n readonly focusVisibleChange = new EventEmitter<boolean>();\n\n focusVisible = false;\n\n constructor() {\n this.autoIdString = `${TUI}${AbstractTuiInteractive.autoId++}${Date.now()}`;\n }\n\n @HostBinding(`class._disabled`)\n get computedDisabled(): boolean {\n return this.disabled;\n }\n\n get computedFocusable(): boolean {\n return !this.computedDisabled && (this.focusable || this.focused);\n }\n\n @HostBinding(`class._focused`)\n get computedFocused(): boolean {\n return !this.computedDisabled && (this.pseudoFocus ?? this.focused);\n }\n\n @HostBinding(`class._focus-visible`)\n get computedFocusVisible(): boolean {\n return !this.computedDisabled && (this.pseudoFocus ?? this.focusVisible);\n }\n\n // TODO: 3.0 Consider removing since native input is exposed\n get id(): string {\n return this.nativeId || this.autoIdString;\n }\n\n protected updateFocused(focused: boolean): void {\n this.focusedChange.emit(focused);\n }\n\n protected updateFocusVisible(focusVisible: boolean): void {\n if (this.focusVisible === focusVisible) {\n return;\n }\n\n this.focusVisible = focusVisible;\n this.focusVisibleChange.emit(focusVisible);\n }\n}\n","export abstract class AbstractTuiValueTransformer<From, To = unknown> {\n abstract toControlValue(componentValue: From): To;\n abstract fromControlValue(controlValue: To): From;\n}\n","import {\n ChangeDetectorRef,\n Directive,\n HostBinding,\n Inject,\n Input,\n OnDestroy,\n OnInit,\n Optional,\n Provider,\n Type,\n} from '@angular/core';\nimport {AbstractControl, ControlValueAccessor, NgControl, NgModel} from '@angular/forms';\nimport {tuiAssert} from '@taiga-ui/cdk/classes';\nimport {EMPTY_FUNCTION} from '@taiga-ui/cdk/constants';\nimport {TuiControlValueTransformer} from '@taiga-ui/cdk/interfaces';\nimport {tuiIsPresent} from '@taiga-ui/cdk/utils';\nimport {merge, Subject} from 'rxjs';\nimport {\n delay,\n distinctUntilChanged,\n filter,\n map,\n startWith,\n switchMap,\n takeUntil,\n} from 'rxjs/operators';\n\nimport {AbstractTuiInteractive} from './interactive';\nimport {AbstractTuiValueTransformer} from './value-transformer';\n\n/**\n * Basic ControlValueAccessor class to build form components upon\n */\n@Directive()\nexport abstract class AbstractTuiControl<T>\n extends AbstractTuiInteractive\n implements OnDestroy, OnInit, ControlValueAccessor\n{\n private previousInternalValue?: T | null;\n private readonly refresh$ = new Subject();\n\n private onTouched = EMPTY_FUNCTION;\n\n private onChange = EMPTY_FUNCTION;\n\n protected readonly fallbackValue = this.getFallbackValue();\n\n protected readonly destroy$ = new Subject<void>();\n\n @Input()\n @HostBinding(`class._readonly`)\n readOnly = false;\n\n @Input()\n pseudoInvalid: boolean | null = null;\n\n constructor(\n @Optional()\n private readonly ngControl: NgControl | null,\n protected readonly cdr: ChangeDetectorRef,\n @Optional()\n @Inject(AbstractTuiValueTransformer)\n protected readonly valueTransformer?: TuiControlValueTransformer<T> | null,\n ) {\n super();\n\n if (ngDevMode && this.ngControl === null) {\n tuiAssert.assert(\n false,\n `NgControl not injected in ${this.constructor.name}!\\n`,\n `Use [(ngModel)] or [formControl] or formControlName for correct work.`,\n );\n }\n\n if (this.ngControl) {\n this.ngControl.valueAccessor = this;\n }\n }\n\n protected abstract getFallbackValue(): T;\n\n @HostBinding(`class._invalid`)\n get computedInvalid(): boolean {\n return (\n this.interactive &&\n (this.pseudoInvalid !== null\n ? this.pseudoInvalid\n : this.touched && this.invalid)\n );\n }\n\n get value(): T {\n return this.previousInternalValue ?? this.fallbackValue;\n }\n\n set value(value: T) {\n this.updateValue(value);\n }\n\n get safeCurrentValue(): T {\n return this.rawValue ?? this.fallbackValue;\n }\n\n get invalid(): boolean {\n return this.safeNgControlData<boolean>(({invalid}) => invalid, false);\n }\n\n get valid(): boolean {\n return this.safeNgControlData<boolean>(({valid}) => valid, false);\n }\n\n get touched(): boolean {\n return this.safeNgControlData<boolean>(({touched}) => touched, false);\n }\n\n get disabled(): boolean {\n return this.safeNgControlData<boolean>(({disabled}) => disabled, false);\n }\n\n get interactive(): boolean {\n return !this.readOnly && !this.computedDisabled;\n }\n\n get control(): AbstractControl | null {\n return this.safeNgControlData<AbstractControl | null>(\n ({control}) => control,\n null,\n );\n }\n\n get computedName(): string | null {\n return this.controlName?.toString() ?? null;\n }\n\n protected get controlName(): string | null {\n return this.ngControl?.name?.toString() ?? null;\n }\n\n private get rawValue(): T | undefined {\n const {ngControl} = this;\n\n if (ngControl === null) {\n return undefined;\n }\n\n const controlValue =\n ngControl instanceof NgModel && this.previousInternalValue === undefined\n ? ngControl.viewModel\n : ngControl.value;\n\n return this.fromControlValue(controlValue);\n }\n\n ngOnInit(): void {\n this.refresh$\n .pipe(\n delay(0),\n startWith(null),\n map(() => this.ngControl?.control),\n filter(tuiIsPresent),\n distinctUntilChanged(),\n switchMap(control => merge(control.valueChanges, control.statusChanges)),\n takeUntil(this.destroy$),\n )\n .subscribe(() => {\n this.refreshLocalValue(this.safeCurrentValue);\n });\n }\n\n ngOnDestroy(): void {\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n checkControlUpdate(): void {\n this.cdr.markForCheck();\n }\n\n registerOnChange(onChange: (value: T | unknown) => void): void {\n this.onChange = (componentValue: T) => {\n onChange(this.toControlValue(componentValue));\n };\n\n this.refresh$.next();\n }\n\n registerOnTouched(onTouched: () => void): void {\n this.onTouched = onTouched;\n }\n\n setDisabledState(): void {\n this.checkControlUpdate();\n }\n\n writeValue(value: T | null): void {\n const controlValue =\n this.ngControl instanceof NgModel && this.previousInternalValue === undefined\n ? this.ngControl.model\n : value;\n\n this.refreshLocalValue(this.fromControlValue(controlValue));\n }\n\n protected override updateFocused(focused: boolean): void {\n if (!focused) {\n this.controlMarkAsTouched();\n }\n\n super.updateFocused(focused);\n }\n\n /**\n * @deprecated use `value` setter\n */\n protected updateValue(value: T): void {\n if (this.disabled || this.valueIdenticalComparator(this.value, value)) {\n return;\n }\n\n this.previousInternalValue = value;\n this.controlSetValue(value);\n }\n\n protected valueIdenticalComparator(oldValue: T, newValue: T): boolean {\n return oldValue === newValue;\n }\n\n private safeNgControlData<T>(\n extractor: (ngControl: NgControl) => T | null | undefined,\n defaultFieldValue: T,\n ): T {\n return (this.ngControl && extractor(this.ngControl)) ?? defaultFieldValue;\n }\n\n private controlMarkAsTouched(): void {\n this.onTouched();\n this.checkControlUpdate();\n }\n\n private controlSetValue(value: T): void {\n this.onChange(value);\n this.checkControlUpdate();\n }\n\n private refreshLocalValue(value: T | null): void {\n this.previousInternalValue = value;\n this.checkControlUpdate();\n }\n\n private fromControlValue(controlValue: unknown): T {\n return this.valueTransformer\n ? this.valueTransformer.fromControlValue(controlValue)\n : (controlValue as T);\n }\n\n private toControlValue(componentValue: T): unknown {\n return this.valueTransformer\n ? this.valueTransformer.toControlValue(componentValue)\n : componentValue;\n }\n}\n\nexport function tuiAsControl<T>(useExisting: Type<AbstractTuiControl<T>>): Provider {\n return {\n provide: AbstractTuiControl,\n useExisting,\n };\n}\n","import {Directive, OnChanges} from '@angular/core';\nimport {Subject} from 'rxjs';\n\n@Directive()\nexport abstract class AbstractTuiController implements OnChanges {\n readonly change$ = new Subject<void>();\n\n ngOnChanges(): void {\n this.change$.next();\n }\n}\n","import {Inject, Injectable} from '@angular/core';\nimport {TuiBaseDialogContext} from '@taiga-ui/cdk/interfaces';\nimport {TuiIdService} from '@taiga-ui/cdk/services';\nimport {TuiDialog} from '@taiga-ui/cdk/types';\nimport {PolymorpheusComponent, PolymorpheusContent} from '@tinkoff/ng-polymorpheus';\nimport {BehaviorSubject, Observable} from 'rxjs';\n\n@Injectable()\nexport abstract class AbstractTuiDialogService<T, K = void> extends Observable<\n ReadonlyArray<TuiDialog<T, any>>\n> {\n protected abstract readonly component: PolymorpheusComponent<any, TuiDialog<T, any>>;\n\n protected abstract readonly defaultOptions: T;\n\n protected readonly dialogs$ = new BehaviorSubject<ReadonlyArray<TuiDialog<T, any>>>(\n [],\n );\n\n constructor(@Inject(TuiIdService) private readonly idService: TuiIdService) {\n super(observer => this.dialogs$.subscribe(observer));\n }\n\n open<G = void>(\n content: PolymorpheusContent<T & TuiBaseDialogContext<K extends void ? G : K>>,\n options: Partial<T> = {},\n ): Observable<K extends void ? G : K> {\n return new Observable(observer => {\n const completeWith = (result: K extends void ? G : K): void => {\n observer.next(result);\n observer.complete();\n };\n const dialog = {\n ...this.defaultOptions,\n ...options,\n content,\n completeWith,\n $implicit: observer,\n component: this.component,\n createdAt: Date.now(),\n id: this.idService.generate(),\n };\n\n this.dialogs$.next([...this.dialogs$.value, dialog]);\n\n return () => {\n this.dialogs$.next(this.dialogs$.value.filter(item => item !== dialog));\n };\n });\n }\n}\n","import {\n ChangeDetectorRef,\n Directive,\n Inject,\n OnChanges,\n TemplateRef,\n} from '@angular/core';\nimport {tuiIfMap} from '@taiga-ui/cdk/observables';\nimport {TuiDialog} from '@taiga-ui/cdk/types';\nimport {PolymorpheusTemplate} from '@tinkoff/ng-polymorpheus';\nimport {Subject} from 'rxjs';\nimport {distinctUntilChanged, endWith, ignoreElements, share} from 'rxjs/operators';\n\nimport {AbstractTuiDialogService} from './dialog.service';\n\n@Directive()\nexport abstract class AbstractTuiDialogDirective<T>\n extends PolymorpheusTemplate<TuiDialog<T, void>>\n implements OnChanges\n{\n private readonly open$ = new Subject<boolean>();\n\n options: Partial<T> = {};\n open = false;\n\n openChange = this.open$.pipe(\n distinctUntilChanged(),\n tuiIfMap(() =>\n this.service.open(this, this.options).pipe(ignoreElements(), endWith(false)),\n ),\n share(),\n );\n\n constructor(\n @Inject(TemplateRef)\n templateRef: TemplateRef<TuiDialog<T, void>>,\n @Inject(ChangeDetectorRef) cdr: ChangeDetectorRef,\n @Inject(AbstractTuiDialogService)\n private readonly service: AbstractTuiDialogService<T>,\n ) {\n super(templateRef, cdr);\n }\n\n ngOnChanges(): void {\n this.open$.next(this.open);\n }\n}\n","import {Directive} from '@angular/core';\n\nimport {AbstractTuiControl} from './control';\n\n@Directive()\nexport abstract class AbstractTuiMultipleControl<T> extends AbstractTuiControl<\n readonly T[]\n> {\n clear(): void {\n this.value = [];\n }\n\n protected getFallbackValue(): readonly T[] {\n return [];\n }\n}\n","import {Directive} from '@angular/core';\n\nimport {AbstractTuiControl} from './control';\n\n@Directive()\nexport abstract class AbstractTuiNullableControl<T> extends AbstractTuiControl<T | null> {\n protected getFallbackValue(): T | null {\n return null;\n }\n}\n","import {ComponentRef, EmbeddedViewRef, Injectable, TemplateRef} from '@angular/core';\nimport {TuiNoHostException} from '@taiga-ui/cdk/exceptions';\nimport {PolymorpheusComponent} from '@tinkoff/ng-polymorpheus';\n\nimport {AbstractTuiPortalHostComponent} from './portal-host';\n\n/**\n * Abstract service for displaying portals\n */\n@Injectable()\nexport abstract class AbstractTuiPortalService {\n protected host?: AbstractTuiPortalHostComponent;\n\n protected get safeHost(): AbstractTuiPortalHostComponent {\n if (!this.host) {\n throw new TuiNoHostException();\n }\n\n return this.host;\n }\n\n attach(host: AbstractTuiPortalHostComponent): void {\n this.host = host;\n }\n\n add<C>(component: PolymorpheusComponent<C>): ComponentRef<C> {\n return this.safeHost.addComponentChild(component);\n }\n\n remove<C>({hostView}: ComponentRef<C>): void {\n hostView.destroy();\n }\n\n addTemplate<C>(templateRef: TemplateRef<C>, context?: C): EmbeddedViewRef<C> {\n return this.safeHost.addTemplateChild(templateRef, context);\n }\n\n removeTemplate<C>(viewRef: EmbeddedViewRef<C>): void {\n viewRef.destroy();\n }\n}\n","import {\n ComponentFactoryResolver,\n ComponentRef,\n Directive,\n ElementRef,\n EmbeddedViewRef,\n Inject,\n INJECTOR,\n Injector,\n TemplateRef,\n ViewChild,\n ViewContainerRef,\n} from '@angular/core';\nimport {PolymorpheusComponent} from '@tinkoff/ng-polymorpheus';\n\nimport {AbstractTuiPortalService} from './portal-service';\n\n/**\n * Abstract class for host element for dynamically created portals.\n */\n@Directive()\nexport abstract class AbstractTuiPortalHostComponent {\n @ViewChild(`viewContainer`, {read: ViewContainerRef})\n private readonly vcr!: ViewContainerRef;\n\n constructor(\n @Inject(INJECTOR) private readonly injector: Injector,\n @Inject(ElementRef) private readonly el: ElementRef<HTMLElement>,\n @Inject(AbstractTuiPortalService) portalService: AbstractTuiPortalService,\n ) {\n portalService.attach(this);\n }\n\n get clientRect(): ClientRect {\n return this.el.nativeElement.getBoundingClientRect();\n }\n\n addComponentChild<C>(component: PolymorpheusComponent<C>): ComponentRef<C> {\n const parent = component.createInjector(this.injector);\n const resolver = parent.get(ComponentFactoryResolver);\n const factory = resolver.resolveComponentFactory(component.component);\n const providers = [{provide: AbstractTuiPortalHostComponent, useValue: this}];\n const injector = Injector.create({parent, providers});\n const ref = this.vcr.createComponent(factory, undefined, injector);\n\n ref.changeDetectorRef.detectChanges();\n\n return ref;\n }\n\n addTemplateChild<C>(templateRef: TemplateRef<C>, context?: C): EmbeddedViewRef<C> {\n return this.vcr.createEmbeddedView(templateRef, context);\n }\n}\n","import {DOCUMENT} from '@angular/common';\nimport {Directive, Inject, OnDestroy} from '@angular/core';\n\n/**\n * Use this abstract class to create your own toggleable themes.\n * A component extending this class must have CSS variables definitions\n * and have ViewEncapsulation set to NONE. A boolean input allows to\n * switch theme on or off.\n */\n@Directive()\nexport abstract class AbstractTuiThemeSwitcher implements OnDestroy {\n static style: HTMLStyleElement | null = null;\n\n constructor(@Inject(DOCUMENT) private readonly doc: Document) {\n if (this.style !== null) {\n this.addTheme();\n\n return;\n }\n\n const styles = this.doc.head.querySelectorAll(`style`);\n\n (this.constructor as typeof AbstractTuiThemeSwitcher).style =\n styles[styles.length - 1];\n }\n\n get style(): HTMLStyleElement | null {\n return (this.constructor as typeof AbstractTuiThemeSwitcher).style;\n }\n\n ngOnDestroy(): void {\n this.removeTheme();\n }\n\n private addTheme(): void {\n if (this.style) {\n this.doc.head.appendChild(this.style);\n }\n }\n\n private removeTheme(): void {\n if (this.style && this.doc.head.contains(this.style)) {\n this.doc.head.removeChild(this.style);\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAEA,MAAM,GAAG,GAAG,CAAA,gBAAA,CAAkB,CAAC;AAE/B;;AAEG;MAEmB,sBAAsB,CAAA;AAsCxC,IAAA,WAAA,GAAA;QA5BA,IAAW,CAAA,WAAA,GAAmB,IAAI,CAAC;QAGnC,IAAY,CAAA,YAAA,GAAmB,IAAI,CAAC;QAGpC,IAAW,CAAA,WAAA,GAAmB,IAAI,CAAC;AAEnC;;AAEG;QAEH,IAAS,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ects/cdk/constants/always-false-handler.ts","../../../projects/cdk/constants/always-true-handler.ts","../../../projects/cdk/constants/browser.ts","../../../projects/cdk/constants/empty.ts","../../../projects/cdk/constants/stringify.ts","../../../projects/cdk/constants/matcher.ts","../../../projects/cdk/constants/parent-animation.ts","../../../projects/cdk/constants/polling-time.ts","../../../projects/cdk/constants/svg-node-filter.ts","../../../projects/cdk/constants/unicode-chars.ts","../../../projects/cdk/constants/version.ts","../../../projects/cdk/constants/taiga-ui-cdk-constants.ts"],"sourcesContent":["/**\n * Handler that always returns `false`.\n */\n// eslint-disable-next-line no-restricted-syntax\nexport const ALWAYS_FALSE_HANDLER = (): false => false;\n","/**\n * Handler that always returns `true`.\n */\n// eslint-disable-next-line no-restricted-syntax\nexport const ALWAYS_TRUE_HANDLER = (): true => true;\n","/**\n * @deprecated\n * TODO: drop support of legacy Edge (EdgeHTML) in v4.x\n */\nexport const CHROMIUM_EDGE_START_VERSION = 79;\n","import {QueryList} from '@angular/core';\n\n/**\n * For type safety when using @ContentChildren and @ViewChildren\n *\n * NOTE: Be careful subscribing to 'changes'\n */\nexport const EMPTY_QUERY = new QueryList<any>();\nexport const EMPTY_ARRAY: [] = [];\nexport const EMPTY_FUNCTION: (...args: any[]) => void = () => {};\n\nconst rect = {\n bottom: 0,\n height: 0,\n left: 0,\n right: 0,\n top: 0,\n width: 0,\n x: 0,\n y: 0,\n} as const;\n\nexport const EMPTY_CLIENT_RECT: DOMRect = {\n ...rect,\n toJSON() {\n return rect;\n },\n};\n","import {TuiStringHandler} from '@taiga-ui/cdk/types';\n\n/**\n * Default method to turn arbitrary object into string\n */\nexport const TUI_DEFAULT_STRINGIFY: TuiStringHandler<unknown> = item => String(item);\n","import {TuiHandler, TuiIdentityMatcher} from '@taiga-ui/cdk/types';\n\nimport {TUI_DEFAULT_STRINGIFY} from './stringify';\n\n/**\n * Default handler for matching stringified version of an item and a search query\n * @param item arbitrary element to match with a string\n * @param search search query\n * @param stringify handler to turn item into a string\n */\nexport const TUI_DEFAULT_MATCHER = <T>(\n item: T,\n search: string,\n stringify: TuiHandler<T, string> = TUI_DEFAULT_STRINGIFY,\n): boolean => stringify(item).toLowerCase().includes(search.toLowerCase());\n\n/**\n * Default handler for strict matching stringified version of an item and a search query\n * @param item arbitrary element to match with a string\n * @param search search query\n * @param stringify handler to turn item into a string\n */\nexport const TUI_STRICT_MATCHER = <T>(\n item: T,\n search: string,\n stringify: TuiHandler<T, string> = TUI_DEFAULT_STRINGIFY,\n): boolean => stringify(item).toLowerCase() === search.toLowerCase();\n\n/**\n * Default handler to match equality of two elements\n * ATTENTION: considers two empty arrays equal\n *\n * @param item1 first element\n * @param item2 second element\n */\nexport const TUI_DEFAULT_IDENTITY_MATCHER: TuiIdentityMatcher<unknown> = (item1, item2) =>\n item1 === item2 || bothEmpty(item1, item2);\n\nfunction bothEmpty(item1: unknown, item2: unknown): boolean {\n return Array.isArray(item1) && Array.isArray(item2) && !item1.length && !item2.length;\n}\n","import {animateChild, query, style, transition, trigger} from '@angular/animations';\n\n/**\n * Add to enable child :leave animation (fixes https://github.com/angular/angular/issues/15753)\n */\nexport const TUI_PARENT_ANIMATION = trigger(`tuiParentAnimation`, [\n transition(`* => void`, [\n style({overflow: `hidden`}),\n query(`:scope > *`, [animateChild()], {optional: true}),\n ]),\n]);\n\n/**\n * Add on parent to stop initial :enter animation for children\n */\nexport const TUI_PARENT_STOP = trigger(`tuiParentStop`, [transition(`:enter`, [])]);\n","export const POLLING_TIME = 1000 / 15;\n","// Filtering SVGElements for TreeWalker\n// Filter must be a function in IE, other modern browsers are compliant to this format\nexport const svgNodeFilter: NodeFilter = ((node: Node) =>\n `ownerSVGElement` in node\n ? NodeFilter.FILTER_REJECT\n : NodeFilter.FILTER_ACCEPT) as any;\n","/**\n * {@link https://unicode-table.com/en/00A0/ Non-breaking space}.\n */\nexport const CHAR_NO_BREAK_SPACE = `\\u00A0`;\n\n/**\n * {@link https://unicode-table.com/en/2013/ EN dash}\n * is used to indicate a range of numbers or a span of time.\n * @example 2006–2022\n * ___\n * Don't confuse with {@link CHAR_EM_DASH} or {@link CHAR_HYPHEN}!\n */\nexport const CHAR_EN_DASH = `\\u2013`;\n\n/**\n * {@link https://unicode-table.com/en/2014/ EM dash}\n * is used to mark a break in a sentence.\n * @example Taiga UI — powerful set of open source components for Angular\n * ___\n * Don't confuse with {@link CHAR_EN_DASH} or {@link CHAR_HYPHEN}!\n */\nexport const CHAR_EM_DASH = `\\u2014`;\n\n/**\n * {@link https://unicode-table.com/en/00AB/ Left-Pointing Double Angle Quotation Mark}\n */\nexport const CHAR_LAQUO = `\\u00AB`;\n\n/**\n * {@link https://unicode-table.com/en/00BB/ Right-Pointing Double Angle Quotation Mark}\n */\nexport const CHAR_RAQUO = `\\u00BB`;\n\n/**\n * {@link https://unicode-table.com/en/002D/ Hyphen (minus sign)}\n * is used to combine words.\n * @example well-behaved\n * ___\n * Don't confuse with {@link CHAR_EN_DASH} or {@link CHAR_EM_DASH}!\n */\nexport const CHAR_HYPHEN = `\\u002D`;\n\n/**\n * {@link https://unicode-table.com/en/2212/ Minus}\n * is used as math operator symbol or before negative digits.\n * ---\n * Can be used as `−`. Don't confuse with {@link CHAR_HYPHEN}\n */\nexport const CHAR_MINUS = `\\u2212`;\n\n/**\n * {@link https://unicode-table.com/en/002B/ Plus}\n */\nexport const CHAR_PLUS = `\\u002B`;\n\n/**\n * {@link https://unicode-table.com/en/2022/ Bullet}.\n */\nexport const CHAR_BULLET = `\\u2022`;\n\n/**\n * {@link https://unicode-table.com/en/2026/ Suspension points}.\n */\nexport const CHAR_ELLIPSIS = `\\u2026`;\n\n/**\n * {@link https://unicode-table.com/en/00A4/ Suspension points}.\n */\nexport const CHAR_CURRENCY_SIGN = `\\u00A4`;\n\n/**\n * {@link https://unicode-table.com/en/200b/ Suspension points}.\n */\nexport const CHAR_ZERO_WIDTH_SPACE = `\\u200B`;\n","export const TUI_VERSION = `3.
|
1
|
+
{"version":3,"file":"taiga-ui-cdk-constants.js","sources":["../../../projects/cdk/constants/always-false-handler.ts","../../../projects/cdk/constants/always-true-handler.ts","../../../projects/cdk/constants/browser.ts","../../../projects/cdk/constants/empty.ts","../../../projects/cdk/constants/stringify.ts","../../../projects/cdk/constants/matcher.ts","../../../projects/cdk/constants/parent-animation.ts","../../../projects/cdk/constants/polling-time.ts","../../../projects/cdk/constants/svg-node-filter.ts","../../../projects/cdk/constants/unicode-chars.ts","../../../projects/cdk/constants/version.ts","../../../projects/cdk/constants/taiga-ui-cdk-constants.ts"],"sourcesContent":["/**\n * Handler that always returns `false`.\n */\n// eslint-disable-next-line no-restricted-syntax\nexport const ALWAYS_FALSE_HANDLER = (): false => false;\n","/**\n * Handler that always returns `true`.\n */\n// eslint-disable-next-line no-restricted-syntax\nexport const ALWAYS_TRUE_HANDLER = (): true => true;\n","/**\n * @deprecated\n * TODO: drop support of legacy Edge (EdgeHTML) in v4.x\n */\nexport const CHROMIUM_EDGE_START_VERSION = 79;\n","import {QueryList} from '@angular/core';\n\n/**\n * For type safety when using @ContentChildren and @ViewChildren\n *\n * NOTE: Be careful subscribing to 'changes'\n */\nexport const EMPTY_QUERY = new QueryList<any>();\nexport const EMPTY_ARRAY: [] = [];\nexport const EMPTY_FUNCTION: (...args: any[]) => void = () => {};\n\nconst rect = {\n bottom: 0,\n height: 0,\n left: 0,\n right: 0,\n top: 0,\n width: 0,\n x: 0,\n y: 0,\n} as const;\n\nexport const EMPTY_CLIENT_RECT: DOMRect = {\n ...rect,\n toJSON() {\n return rect;\n },\n};\n","import {TuiStringHandler} from '@taiga-ui/cdk/types';\n\n/**\n * Default method to turn arbitrary object into string\n */\nexport const TUI_DEFAULT_STRINGIFY: TuiStringHandler<unknown> = item => String(item);\n","import {TuiHandler, TuiIdentityMatcher} from '@taiga-ui/cdk/types';\n\nimport {TUI_DEFAULT_STRINGIFY} from './stringify';\n\n/**\n * Default handler for matching stringified version of an item and a search query\n * @param item arbitrary element to match with a string\n * @param search search query\n * @param stringify handler to turn item into a string\n */\nexport const TUI_DEFAULT_MATCHER = <T>(\n item: T,\n search: string,\n stringify: TuiHandler<T, string> = TUI_DEFAULT_STRINGIFY,\n): boolean => stringify(item).toLowerCase().includes(search.toLowerCase());\n\n/**\n * Default handler for strict matching stringified version of an item and a search query\n * @param item arbitrary element to match with a string\n * @param search search query\n * @param stringify handler to turn item into a string\n */\nexport const TUI_STRICT_MATCHER = <T>(\n item: T,\n search: string,\n stringify: TuiHandler<T, string> = TUI_DEFAULT_STRINGIFY,\n): boolean => stringify(item).toLowerCase() === search.toLowerCase();\n\n/**\n * Default handler to match equality of two elements\n * ATTENTION: considers two empty arrays equal\n *\n * @param item1 first element\n * @param item2 second element\n */\nexport const TUI_DEFAULT_IDENTITY_MATCHER: TuiIdentityMatcher<unknown> = (item1, item2) =>\n item1 === item2 || bothEmpty(item1, item2);\n\nfunction bothEmpty(item1: unknown, item2: unknown): boolean {\n return Array.isArray(item1) && Array.isArray(item2) && !item1.length && !item2.length;\n}\n","import {animateChild, query, style, transition, trigger} from '@angular/animations';\n\n/**\n * Add to enable child :leave animation (fixes https://github.com/angular/angular/issues/15753)\n */\nexport const TUI_PARENT_ANIMATION = trigger(`tuiParentAnimation`, [\n transition(`* => void`, [\n style({overflow: `hidden`}),\n query(`:scope > *`, [animateChild()], {optional: true}),\n ]),\n]);\n\n/**\n * Add on parent to stop initial :enter animation for children\n */\nexport const TUI_PARENT_STOP = trigger(`tuiParentStop`, [transition(`:enter`, [])]);\n","export const POLLING_TIME = 1000 / 15;\n","// Filtering SVGElements for TreeWalker\n// Filter must be a function in IE, other modern browsers are compliant to this format\nexport const svgNodeFilter: NodeFilter = ((node: Node) =>\n `ownerSVGElement` in node\n ? NodeFilter.FILTER_REJECT\n : NodeFilter.FILTER_ACCEPT) as any;\n","/**\n * {@link https://unicode-table.com/en/00A0/ Non-breaking space}.\n */\nexport const CHAR_NO_BREAK_SPACE = `\\u00A0`;\n\n/**\n * {@link https://unicode-table.com/en/2013/ EN dash}\n * is used to indicate a range of numbers or a span of time.\n * @example 2006–2022\n * ___\n * Don't confuse with {@link CHAR_EM_DASH} or {@link CHAR_HYPHEN}!\n */\nexport const CHAR_EN_DASH = `\\u2013`;\n\n/**\n * {@link https://unicode-table.com/en/2014/ EM dash}\n * is used to mark a break in a sentence.\n * @example Taiga UI — powerful set of open source components for Angular\n * ___\n * Don't confuse with {@link CHAR_EN_DASH} or {@link CHAR_HYPHEN}!\n */\nexport const CHAR_EM_DASH = `\\u2014`;\n\n/**\n * {@link https://unicode-table.com/en/00AB/ Left-Pointing Double Angle Quotation Mark}\n */\nexport const CHAR_LAQUO = `\\u00AB`;\n\n/**\n * {@link https://unicode-table.com/en/00BB/ Right-Pointing Double Angle Quotation Mark}\n */\nexport const CHAR_RAQUO = `\\u00BB`;\n\n/**\n * {@link https://unicode-table.com/en/002D/ Hyphen (minus sign)}\n * is used to combine words.\n * @example well-behaved\n * ___\n * Don't confuse with {@link CHAR_EN_DASH} or {@link CHAR_EM_DASH}!\n */\nexport const CHAR_HYPHEN = `\\u002D`;\n\n/**\n * {@link https://unicode-table.com/en/2212/ Minus}\n * is used as math operator symbol or before negative digits.\n * ---\n * Can be used as `−`. Don't confuse with {@link CHAR_HYPHEN}\n */\nexport const CHAR_MINUS = `\\u2212`;\n\n/**\n * {@link https://unicode-table.com/en/002B/ Plus}\n */\nexport const CHAR_PLUS = `\\u002B`;\n\n/**\n * {@link https://unicode-table.com/en/2022/ Bullet}.\n */\nexport const CHAR_BULLET = `\\u2022`;\n\n/**\n * {@link https://unicode-table.com/en/2026/ Suspension points}.\n */\nexport const CHAR_ELLIPSIS = `\\u2026`;\n\n/**\n * {@link https://unicode-table.com/en/00A4/ Suspension points}.\n */\nexport const CHAR_CURRENCY_SIGN = `\\u00A4`;\n\n/**\n * {@link https://unicode-table.com/en/200b/ Suspension points}.\n */\nexport const CHAR_ZERO_WIDTH_SPACE = `\\u200B`;\n","export const TUI_VERSION = `3.35.0`;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nex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SAAS,GAAG,SAAS;AAElC;;AAEG;AACI,MAAM,WAAW,GAAG,SAAS;AAEpC;;AAEG;AACI,MAAM,aAAa,GAAG,SAAS;AAEtC;;AAEG;AACI,MAAM,kBAAkB,GAAG,SAAS;AAE3C;;AAEG;AACI,MAAM,qBAAqB,GAAG;;ACzE9B,MAAM,WAAW,GAAG;;ACA3B;;AAEG;;;;"}
|
@@ -1,3 +1,5 @@
|
|
1
|
+
// TODO: change type in v4.0
|
2
|
+
// eslint-disable-next-line no-restricted-syntax
|
1
3
|
var TuiDayOfWeek;
|
2
4
|
(function (TuiDayOfWeek) {
|
3
5
|
TuiDayOfWeek[TuiDayOfWeek["Sunday"] = 0] = "Sunday";
|
@@ -9,6 +11,8 @@ var TuiDayOfWeek;
|
|
9
11
|
TuiDayOfWeek[TuiDayOfWeek["Saturday"] = 6] = "Saturday";
|
10
12
|
})(TuiDayOfWeek || (TuiDayOfWeek = {}));
|
11
13
|
|
14
|
+
// TODO: change type in v4.0
|
15
|
+
// eslint-disable-next-line no-restricted-syntax
|
12
16
|
var TuiMonthNumber;
|
13
17
|
(function (TuiMonthNumber) {
|
14
18
|
TuiMonthNumber[TuiMonthNumber["January"] = 0] = "January";
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"taiga-ui-cdk-enums.js","sources":["../../../projects/cdk/enums/day-of-week.ts","../../../projects/cdk/enums/month-number.ts","../../../projects/cdk/enums/taiga-ui-cdk-enums.ts"],"sourcesContent":["
|
1
|
+
{"version":3,"file":"taiga-ui-cdk-enums.js","sources":["../../../projects/cdk/enums/day-of-week.ts","../../../projects/cdk/enums/month-number.ts","../../../projects/cdk/enums/taiga-ui-cdk-enums.ts"],"sourcesContent":["// TODO: change type in v4.0\n// eslint-disable-next-line no-restricted-syntax\nexport enum TuiDayOfWeek {\n Sunday,\n Monday,\n Tuesday,\n Wednesday,\n Thursday,\n Friday,\n Saturday,\n}\n","// TODO: change type in v4.0\n// eslint-disable-next-line no-restricted-syntax\nexport enum TuiMonthNumber {\n January,\n February,\n March,\n April,\n May,\n June,\n July,\n August,\n September,\n October,\n November,\n December,\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"AAAA;AACA;IACY,aAQX;AARD,CAAA,UAAY,YAAY,EAAA;AACpB,IAAA,YAAA,CAAA,YAAA,CAAA,QAAA,CAAA,GAAA,CAAA,CAAA,GAAA,QAAM,CAAA;AACN,IAAA,YAAA,CAAA,YAAA,CAAA,QAAA,CAAA,GAAA,CAAA,CAAA,GAAA,QAAM,CAAA;AACN,IAAA,YAAA,CAAA,YAAA,CAAA,SAAA,CAAA,GAAA,CAAA,CAAA,GAAA,SAAO,CAAA;AACP,IAAA,YAAA,CAAA,YAAA,CAAA,WAAA,CAAA,GAAA,CAAA,CAAA,GAAA,WAAS,CAAA;AACT,IAAA,YAAA,CAAA,YAAA,CAAA,UAAA,CAAA,GAAA,CAAA,CAAA,GAAA,UAAQ,CAAA;AACR,IAAA,YAAA,CAAA,YAAA,CAAA,QAAA,CAAA,GAAA,CAAA,CAAA,GAAA,QAAM,CAAA;AACN,IAAA,YAAA,CAAA,YAAA,CAAA,UAAA,CAAA,GAAA,CAAA,CAAA,GAAA,UAAQ,CAAA;AACZ,CAAC,EARW,YAAY,KAAZ,YAAY,GAQvB,EAAA,CAAA,CAAA;;ACVD;AACA;IACY,eAaX;AAbD,CAAA,UAAY,cAAc,EAAA;AACtB,IAAA,cAAA,CAAA,cAAA,CAAA,SAAA,CAAA,GAAA,CAAA,CAAA,GAAA,SAAO,CAAA;AACP,IAAA,cAAA,CAAA,cAAA,CAAA,UAAA,CAAA,GAAA,CAAA,CAAA,GAAA,UAAQ,CAAA;AACR,IAAA,cAAA,CAAA,cAAA,CAAA,OAAA,CAAA,GAAA,CAAA,CAAA,GAAA,OAAK,CAAA;AACL,IAAA,cAAA,CAAA,cAAA,CAAA,OAAA,CAAA,GAAA,CAAA,CAAA,GAAA,OAAK,CAAA;AACL,IAAA,cAAA,CAAA,cAAA,CAAA,KAAA,CAAA,GAAA,CAAA,CAAA,GAAA,KAAG,CAAA;AACH,IAAA,cAAA,CAAA,cAAA,CAAA,MAAA,CAAA,GAAA,CAAA,CAAA,GAAA,MAAI,CAAA;AACJ,IAAA,cAAA,CAAA,cAAA,CAAA,MAAA,CAAA,GAAA,CAAA,CAAA,GAAA,MAAI,CAAA;AACJ,IAAA,cAAA,CAAA,cAAA,CAAA,QAAA,CAAA,GAAA,CAAA,CAAA,GAAA,QAAM,CAAA;AACN,IAAA,cAAA,CAAA,cAAA,CAAA,WAAA,CAAA,GAAA,CAAA,CAAA,GAAA,WAAS,CAAA;AACT,IAAA,cAAA,CAAA,cAAA,CAAA,SAAA,CAAA,GAAA,CAAA,CAAA,GAAA,SAAO,CAAA;AACP,IAAA,cAAA,CAAA,cAAA,CAAA,UAAA,CAAA,GAAA,EAAA,CAAA,GAAA,UAAQ,CAAA;AACR,IAAA,cAAA,CAAA,cAAA,CAAA,UAAA,CAAA,GAAA,EAAA,CAAA,GAAA,UAAQ,CAAA;AACZ,CAAC,EAbW,cAAc,KAAd,cAAc,GAazB,EAAA,CAAA,CAAA;;ACfD;;AAEG;;;;"}
|
@@ -34,6 +34,8 @@ function tuiMouseDragFinishFrom(target) {
|
|
34
34
|
return merge(tuiTypedFromEvent(target, `mouseup`), tuiTypedFromEvent(target, `dragend`));
|
35
35
|
}
|
36
36
|
|
37
|
+
// TODO: change type in v4.0
|
38
|
+
// eslint-disable-next-line no-restricted-syntax
|
37
39
|
var TuiDragStage;
|
38
40
|
(function (TuiDragStage) {
|
39
41
|
TuiDragStage[TuiDragStage["Start"] = 0] = "Start";
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"taiga-ui-cdk-observables.js","sources":["../../../projects/cdk/observables/control-value.ts","../../../projects/cdk/observables/typed-from-event.ts","../../../projects/cdk/observables/mouse-drag-finish-from.ts","../../../projects/cdk/observables/drag-and-drop-from.ts","../../../projects/cdk/observables/is-alive.ts","../../../projects/cdk/observables/focus-visible-observable.ts","../../../projects/cdk/observables/if-map.ts","../../../projects/cdk/observables/is-observed.ts","../../../projects/cdk/observables/items-query-list-observable.ts","../../../projects/cdk/observables/must-be-present.ts","../../../projects/cdk/observables/pressed-observable.ts","../../../projects/cdk/observables/prevent-default.ts","../../../projects/cdk/observables/scroll-from.ts","../../../projects/cdk/observables/stop-propagation.ts","../../../projects/cdk/observables/watch.ts","../../../projects/cdk/observables/zone-free.ts","../../../projects/cdk/observables/taiga-ui-cdk-observables.ts"],"sourcesContent":["import {AbstractControl, AbstractControlDirective} from '@angular/forms';\nimport {TuiValueChangesException} from '@taiga-ui/cdk/exceptions';\nimport {Observable} from 'rxjs';\nimport {startWith} from 'rxjs/operators';\n\n/**\n * Turns AbstractControl/Abstract-control-directive valueChanges into ReplaySubject(1)\n */\nexport function tuiControlValue<T>(\n control: AbstractControl | AbstractControlDirective,\n): Observable<T> {\n return new Observable(subscriber => {\n if (!control.valueChanges) {\n throw new TuiValueChangesException();\n }\n\n control.valueChanges.pipe(startWith(control.value)).subscribe(subscriber);\n });\n}\n","import {TuiEventWith, TuiTypedEventTarget} from '@taiga-ui/cdk/types';\nimport {fromEvent, Observable} from 'rxjs';\n\nexport function tuiTypedFromEvent<E extends keyof WindowEventMap>(\n target: Window,\n event: E,\n options?: AddEventListenerOptions,\n): Observable<TuiEventWith<WindowEventMap[E], typeof target>>;\n\nexport function tuiTypedFromEvent<E extends keyof DocumentEventMap>(\n target: Document,\n event: E,\n options?: AddEventListenerOptions,\n): Observable<TuiEventWith<DocumentEventMap[E], typeof target>>;\n\nexport function tuiTypedFromEvent<T extends Element, E extends keyof HTMLElementEventMap>(\n target: T,\n event: E,\n options?: AddEventListenerOptions,\n): Observable<TuiEventWith<HTMLElementEventMap[E], typeof target>>;\n\nexport function tuiTypedFromEvent<\n E extends Event,\n T extends TuiTypedEventTarget<TuiEventWith<E, T>>,\n>(\n target: T,\n event: string,\n options?: AddEventListenerOptions,\n): Observable<TuiEventWith<E, T>>;\n\nexport function tuiTypedFromEvent<E extends Event>(\n target: TuiTypedEventTarget<E>,\n event: string,\n options?: AddEventListenerOptions,\n): Observable<E>;\n\nexport function tuiTypedFromEvent<E extends Event>(\n target: TuiTypedEventTarget<E>,\n event: string,\n options: AddEventListenerOptions = {},\n): Observable<E> {\n /**\n * @note:\n * in RxJS 7 type signature `TuiTypedEventTarget<E>` !== `HasEventTargetAddRemove<E>`\n */\n return fromEvent<E>(target as any, event, options) as unknown as Observable<E>;\n}\n","import {TuiEventWith, TuiTypedEventTarget} from '@taiga-ui/cdk/types';\nimport {merge, Observable} from 'rxjs';\n\nimport {tuiTypedFromEvent} from './typed-from-event';\n\n/**\n * Letting go of the mouse after it was pressed\n * @param target\n */\nexport function tuiMouseDragFinishFrom<\n T extends TuiTypedEventTarget<TuiEventWith<DragEvent, T>>,\n>(target: Exclude<T, null>): Observable<TuiEventWith<MouseEvent, T>> {\n return merge(\n tuiTypedFromEvent(target, `mouseup`),\n tuiTypedFromEvent(target, `dragend`),\n );\n}\n","import {TuiOwnerDocumentException} from '@taiga-ui/cdk/exceptions';\nimport {tuiIsPresent} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {concat, merge, Observable} from 'rxjs';\nimport {endWith, map, repeat, take, takeWhile} from 'rxjs/operators';\n\nimport {tuiMouseDragFinishFrom} from './mouse-drag-finish-from';\nimport {tuiTypedFromEvent} from './typed-from-event';\n\nexport enum TuiDragStage {\n Start,\n Continues,\n End,\n}\n\nexport class TuiDragState {\n constructor(readonly stage: TuiDragStage, readonly event: MouseEvent) {}\n}\n\nexport function tuiDragAndDropFrom(element: Element): Observable<TuiDragState> {\n const {ownerDocument} = element;\n\n if (!ownerDocument) {\n throw new TuiOwnerDocumentException();\n }\n\n return concat(\n tuiTypedFromEvent(element, `mousedown`).pipe(\n take(1),\n map(event => new TuiDragState(TuiDragStage.Start, event)),\n ),\n merge(\n tuiTypedFromEvent(ownerDocument, `mousemove`).pipe(\n map(event => new TuiDragState(TuiDragStage.Continues, event)),\n ),\n tuiMouseDragFinishFrom(ownerDocument).pipe(\n take(1),\n map(event => new TuiDragState(TuiDragStage.End, event)),\n endWith(null),\n ),\n ).pipe(takeWhile(tuiIsPresent)),\n ).pipe(repeat());\n}\n","import {ALWAYS_FALSE_HANDLER} from '@taiga-ui/cdk/constants';\nimport {OperatorFunction, pipe, timer} from 'rxjs';\nimport {distinctUntilChanged, map, startWith, switchMap} from 'rxjs/operators';\n\n/**\n * Operator to set lifespan after which current value is considered obsolete\n */\nexport function tuiIsAlive(lifespan: number = 0): OperatorFunction<unknown, boolean> {\n return pipe(\n switchMap(() => timer(lifespan).pipe(map(ALWAYS_FALSE_HANDLER), startWith(true))),\n distinctUntilChanged(),\n );\n}\n","import {ALWAYS_FALSE_HANDLER} from '@taiga-ui/cdk/constants';\nimport {TuiOwnerDocumentException} from '@taiga-ui/cdk/exceptions';\nimport {tuiIsFalsy} from '@taiga-ui/cdk/utils';\nimport {tuiIsNativeFocused} from '@taiga-ui/cdk/utils/focus';\nimport {concat, merge, Observable} from 'rxjs';\nimport {\n distinctUntilChanged,\n filter,\n ignoreElements,\n map,\n repeat,\n shareReplay,\n startWith,\n switchMap,\n take,\n withLatestFrom,\n} from 'rxjs/operators';\n\nimport {tuiIsAlive} from './is-alive';\nimport {tuiTypedFromEvent} from './typed-from-event';\n\nlet documentMouseUpIsAlive$: Observable<boolean>;\nlet documentMouseDownIsAlive$: Observable<boolean>;\n\nexport function tuiFocusVisibleObservable(element: Element): Observable<boolean> {\n const elementBlur$ = tuiTypedFromEvent(element, `blur`);\n const {ownerDocument} = element;\n\n if (!ownerDocument) {\n throw new TuiOwnerDocumentException();\n }\n\n if (!documentMouseDownIsAlive$ || !documentMouseUpIsAlive$) {\n documentMouseUpIsAlive$ = tuiTypedFromEvent(ownerDocument, `mouseup`, {\n capture: true,\n }).pipe(\n tuiIsAlive(),\n startWith(false),\n shareReplay({bufferSize: 1, refCount: true}),\n );\n documentMouseDownIsAlive$ = tuiTypedFromEvent(ownerDocument, `mousedown`, {\n capture: true,\n }).pipe(\n tuiIsAlive(),\n startWith(false),\n shareReplay({bufferSize: 1, refCount: true}),\n );\n }\n\n return merge(\n // focus events excluding ones that came right after mouse action\n concat(\n tuiTypedFromEvent(element, `focus`).pipe(take(1)),\n // filtering out blur events when element remains focused so that we ignore browser tab focus loss\n elementBlur$.pipe(\n filter(() => !tuiIsNativeFocused(element)),\n take(1),\n ignoreElements(),\n ),\n ).pipe(\n repeat(),\n withLatestFrom(\n documentMouseDownIsAlive$,\n documentMouseUpIsAlive$,\n (_event, elementActual, documentActual) =>\n elementActual || documentActual,\n ),\n filter(tuiIsFalsy),\n ),\n ).pipe(\n switchMap(() =>\n elementBlur$.pipe(map(ALWAYS_FALSE_HANDLER), take(1), startWith(true)),\n ),\n distinctUntilChanged(),\n );\n}\n","import {TuiBooleanHandler} from '@taiga-ui/cdk/types';\nimport {EMPTY, Observable, OperatorFunction, pipe} from 'rxjs';\nimport {switchMap} from 'rxjs/operators';\n\nexport function tuiIfMap<T, G>(\n project: (value: T) => Observable<G>,\n predicate: TuiBooleanHandler<T> = Boolean,\n): OperatorFunction<T, G> {\n return pipe(switchMap(value => (predicate(value) ? project(value) : EMPTY)));\n}\n","import {Observer, Subject} from 'rxjs';\n\n/* In RxJS 7 All subjects now have an observed property */\ntype SubjectRxJS7plus<T> = Subject<T> & {observed: boolean};\n\n/* In RxJS 8 `observers` will be removed */\ntype SubjectRxJS6<T> = Subject<T> & {observers: Array<Observer<T>>};\n\nexport function tuiIsObserved<T>(observable: Subject<T>): boolean {\n return `observed` in observable\n ? (observable as SubjectRxJS7plus<T>).observed\n : !!(observable as SubjectRxJS6<T>)?.observers?.length;\n}\n","import {QueryList} from '@angular/core';\nimport {tuiGetOriginalArrayFromQueryList} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {Observable} from 'rxjs';\nimport {map, startWith} from 'rxjs/operators';\n\n/**\n * Converts changes observable of a QueryList to an Observable of arrays\n */\nexport function tuiQueryListChanges<T>(\n queryList: QueryList<T>,\n): Observable<readonly T[]> {\n return queryList.changes.pipe(\n startWith(null),\n map(() => tuiGetOriginalArrayFromQueryList(queryList)),\n );\n}\n\n/**\n * @deprecated An alias, use {@link tuiQueryListChanges} instead\n */\nexport const tuiItemsQueryListObservable = tuiQueryListChanges;\n","import {TuiValuePresentException} from '@taiga-ui/cdk/exceptions';\nimport {tuiIsPresent} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {OperatorFunction} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\nexport function tuiMustBePresent<T>(): OperatorFunction<T | null | undefined, T> {\n return map(value => {\n if (!tuiIsPresent(value)) {\n throw new TuiValuePresentException();\n }\n\n return value;\n });\n}\n","import {ALWAYS_FALSE_HANDLER} from '@taiga-ui/cdk/constants';\nimport {TuiOwnerDocumentException} from '@taiga-ui/cdk/exceptions';\nimport {Observable} from 'rxjs';\nimport {filter, map, startWith, switchMap, take} from 'rxjs/operators';\n\nimport {tuiMouseDragFinishFrom} from './mouse-drag-finish-from';\nimport {tuiTypedFromEvent} from './typed-from-event';\n\nexport interface TuiPressedObservableOptions {\n onlyTrusted: boolean;\n}\n\nexport function tuiPressedObservable(\n element: Element,\n {onlyTrusted}: TuiPressedObservableOptions = {onlyTrusted: true},\n): Observable<boolean> {\n const {ownerDocument} = element;\n\n if (!ownerDocument) {\n throw new TuiOwnerDocumentException();\n }\n\n return tuiTypedFromEvent(element, `mousedown`).pipe(\n filter(({isTrusted}) => isTrusted || !onlyTrusted),\n switchMap(() =>\n tuiMouseDragFinishFrom(ownerDocument).pipe(\n map(ALWAYS_FALSE_HANDLER),\n take(1),\n startWith(true),\n ),\n ),\n );\n}\n","import {MonoTypeOperatorFunction} from 'rxjs';\nimport {tap} from 'rxjs/operators';\n\nexport function tuiPreventDefault<T extends Event>(): MonoTypeOperatorFunction<T> {\n return tap(event => event.preventDefault());\n}\n","import {Observable} from 'rxjs';\n\nimport {tuiTypedFromEvent} from './typed-from-event';\n\n/**\n * Normalizes scroll event in case element is `html` (document.documentElement)\n */\nexport function tuiScrollFrom(element: Element): Observable<Event> {\n return tuiTypedFromEvent(\n element === element.ownerDocument.documentElement\n ? element.ownerDocument\n : element,\n `scroll`,\n );\n}\n","import {MonoTypeOperatorFunction} from 'rxjs';\nimport {tap} from 'rxjs/operators';\n\nexport function tuiStopPropagation<T extends Event>(): MonoTypeOperatorFunction<T> {\n return tap(e => {\n e.stopPropagation();\n });\n}\n","import {ChangeDetectorRef} from '@angular/core';\nimport {MonoTypeOperatorFunction} from 'rxjs';\nimport {tap} from 'rxjs/operators';\n\nexport function tuiWatch<T>(cdr: ChangeDetectorRef): MonoTypeOperatorFunction<T> {\n return tap(() => {\n cdr.markForCheck();\n });\n}\n","import {NgZone} from '@angular/core';\nimport {MonoTypeOperatorFunction, Observable, pipe} from 'rxjs';\n\nexport function tuiZonefull<T>(ngZone: NgZone): MonoTypeOperatorFunction<T> {\n return source =>\n new Observable(subscriber =>\n source.subscribe({\n next: value => ngZone.run(() => subscriber.next(value)),\n error: (error: unknown) => ngZone.run(() => subscriber.error(error)),\n complete: () => ngZone.run(() => subscriber.complete()),\n }),\n );\n}\n\nexport function tuiZonefree<T>(ngZone: NgZone): MonoTypeOperatorFunction<T> {\n return source =>\n new Observable(subscriber =>\n ngZone.runOutsideAngular(() => source.subscribe(subscriber)),\n );\n}\n\nexport function tuiZoneOptimized<T>(ngZone: NgZone): MonoTypeOperatorFunction<T> {\n return pipe(tuiZonefree(ngZone), tuiZonefull(ngZone));\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAKA;;AAEG;AACG,SAAU,eAAe,CAC3B,OAAmD,EAAA;AAEnD,IAAA,OAAO,IAAI,UAAU,CAAC,UAAU,IAAG;AAC/B,QAAA,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE;YACvB,MAAM,IAAI,wBAAwB,EAAE,CAAC;AACxC,SAAA;AAED,QAA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D,QAAA,KAAK,EAAE,CAAC,KAAc,KAAK,MAAM,CAAC,GAAG,CAAC,MAAM,UAAU,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;AACpE,QAAA,QAAQ,EAAE,MAAM,MAAM,CAAC,GAAG,CAAC,MAAM,UAAU,CAAC,QAAQ,EAAE,CAAC;AAC1D,KAAA,CAAC,CACL,CAAC;AACV,CAAC;AAEK,SAAU,WAAW,CAAI,MAAc,EAAA;IACzC,OAAO,MAAM,IACT,IAAI,UAAU,CAAC,UAAU,IACrB,MAAM,CAAC,iBAAiB,CAAC,MAAM,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,CAC/D,CAAC;AACV,CAAC;AAEK,SAAU,gBAAgB,CAAI,MAAc,EAAA;AAC9C,IAAA,OAAO,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC;AAC1D;;ACvBA;;AAEG;;;;"}
|
1
|
+
{"version":3,"file":"taiga-ui-cdk-observables.js","sources":["../../../projects/cdk/observables/control-value.ts","../../../projects/cdk/observables/typed-from-event.ts","../../../projects/cdk/observables/mouse-drag-finish-from.ts","../../../projects/cdk/observables/drag-and-drop-from.ts","../../../projects/cdk/observables/is-alive.ts","../../../projects/cdk/observables/focus-visible-observable.ts","../../../projects/cdk/observables/if-map.ts","../../../projects/cdk/observables/is-observed.ts","../../../projects/cdk/observables/items-query-list-observable.ts","../../../projects/cdk/observables/must-be-present.ts","../../../projects/cdk/observables/pressed-observable.ts","../../../projects/cdk/observables/prevent-default.ts","../../../projects/cdk/observables/scroll-from.ts","../../../projects/cdk/observables/stop-propagation.ts","../../../projects/cdk/observables/watch.ts","../../../projects/cdk/observables/zone-free.ts","../../../projects/cdk/observables/taiga-ui-cdk-observables.ts"],"sourcesContent":["import {AbstractControl, AbstractControlDirective} from '@angular/forms';\nimport {TuiValueChangesException} from '@taiga-ui/cdk/exceptions';\nimport {Observable} from 'rxjs';\nimport {startWith} from 'rxjs/operators';\n\n/**\n * Turns AbstractControl/Abstract-control-directive valueChanges into ReplaySubject(1)\n */\nexport function tuiControlValue<T>(\n control: AbstractControl | AbstractControlDirective,\n): Observable<T> {\n return new Observable(subscriber => {\n if (!control.valueChanges) {\n throw new TuiValueChangesException();\n }\n\n control.valueChanges.pipe(startWith(control.value)).subscribe(subscriber);\n });\n}\n","import {TuiEventWith, TuiTypedEventTarget} from '@taiga-ui/cdk/types';\nimport {fromEvent, Observable} from 'rxjs';\n\nexport function tuiTypedFromEvent<E extends keyof WindowEventMap>(\n target: Window,\n event: E,\n options?: AddEventListenerOptions,\n): Observable<TuiEventWith<WindowEventMap[E], typeof target>>;\n\nexport function tuiTypedFromEvent<E extends keyof DocumentEventMap>(\n target: Document,\n event: E,\n options?: AddEventListenerOptions,\n): Observable<TuiEventWith<DocumentEventMap[E], typeof target>>;\n\nexport function tuiTypedFromEvent<T extends Element, E extends keyof HTMLElementEventMap>(\n target: T,\n event: E,\n options?: AddEventListenerOptions,\n): Observable<TuiEventWith<HTMLElementEventMap[E], typeof target>>;\n\nexport function tuiTypedFromEvent<\n E extends Event,\n T extends TuiTypedEventTarget<TuiEventWith<E, T>>,\n>(\n target: T,\n event: string,\n options?: AddEventListenerOptions,\n): Observable<TuiEventWith<E, T>>;\n\nexport function tuiTypedFromEvent<E extends Event>(\n target: TuiTypedEventTarget<E>,\n event: string,\n options?: AddEventListenerOptions,\n): Observable<E>;\n\nexport function tuiTypedFromEvent<E extends Event>(\n target: TuiTypedEventTarget<E>,\n event: string,\n options: AddEventListenerOptions = {},\n): Observable<E> {\n /**\n * @note:\n * in RxJS 7 type signature `TuiTypedEventTarget<E>` !== `HasEventTargetAddRemove<E>`\n */\n return fromEvent<E>(target as any, event, options) as unknown as Observable<E>;\n}\n","import {TuiEventWith, TuiTypedEventTarget} from '@taiga-ui/cdk/types';\nimport {merge, Observable} from 'rxjs';\n\nimport {tuiTypedFromEvent} from './typed-from-event';\n\n/**\n * Letting go of the mouse after it was pressed\n * @param target\n */\nexport function tuiMouseDragFinishFrom<\n T extends TuiTypedEventTarget<TuiEventWith<DragEvent, T>>,\n>(target: Exclude<T, null>): Observable<TuiEventWith<MouseEvent, T>> {\n return merge(\n tuiTypedFromEvent(target, `mouseup`),\n tuiTypedFromEvent(target, `dragend`),\n );\n}\n","import {TuiOwnerDocumentException} from '@taiga-ui/cdk/exceptions';\nimport {tuiIsPresent} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {concat, merge, Observable} from 'rxjs';\nimport {endWith, map, repeat, take, takeWhile} from 'rxjs/operators';\n\nimport {tuiMouseDragFinishFrom} from './mouse-drag-finish-from';\nimport {tuiTypedFromEvent} from './typed-from-event';\n\n// TODO: change type in v4.0\n// eslint-disable-next-line no-restricted-syntax\nexport enum TuiDragStage {\n Start,\n Continues,\n End,\n}\n\nexport class TuiDragState {\n constructor(readonly stage: TuiDragStage, readonly event: MouseEvent) {}\n}\n\nexport function tuiDragAndDropFrom(element: Element): Observable<TuiDragState> {\n const {ownerDocument} = element;\n\n if (!ownerDocument) {\n throw new TuiOwnerDocumentException();\n }\n\n return concat(\n tuiTypedFromEvent(element, `mousedown`).pipe(\n take(1),\n map(event => new TuiDragState(TuiDragStage.Start, event)),\n ),\n merge(\n tuiTypedFromEvent(ownerDocument, `mousemove`).pipe(\n map(event => new TuiDragState(TuiDragStage.Continues, event)),\n ),\n tuiMouseDragFinishFrom(ownerDocument).pipe(\n take(1),\n map(event => new TuiDragState(TuiDragStage.End, event)),\n endWith(null),\n ),\n ).pipe(takeWhile(tuiIsPresent)),\n ).pipe(repeat());\n}\n","import {ALWAYS_FALSE_HANDLER} from '@taiga-ui/cdk/constants';\nimport {OperatorFunction, pipe, timer} from 'rxjs';\nimport {distinctUntilChanged, map, startWith, switchMap} from 'rxjs/operators';\n\n/**\n * Operator to set lifespan after which current value is considered obsolete\n */\nexport function tuiIsAlive(lifespan: number = 0): OperatorFunction<unknown, boolean> {\n return pipe(\n switchMap(() => timer(lifespan).pipe(map(ALWAYS_FALSE_HANDLER), startWith(true))),\n distinctUntilChanged(),\n );\n}\n","import {ALWAYS_FALSE_HANDLER} from '@taiga-ui/cdk/constants';\nimport {TuiOwnerDocumentException} from '@taiga-ui/cdk/exceptions';\nimport {tuiIsFalsy} from '@taiga-ui/cdk/utils';\nimport {tuiIsNativeFocused} from '@taiga-ui/cdk/utils/focus';\nimport {concat, merge, Observable} from 'rxjs';\nimport {\n distinctUntilChanged,\n filter,\n ignoreElements,\n map,\n repeat,\n shareReplay,\n startWith,\n switchMap,\n take,\n withLatestFrom,\n} from 'rxjs/operators';\n\nimport {tuiIsAlive} from './is-alive';\nimport {tuiTypedFromEvent} from './typed-from-event';\n\nlet documentMouseUpIsAlive$: Observable<boolean>;\nlet documentMouseDownIsAlive$: Observable<boolean>;\n\nexport function tuiFocusVisibleObservable(element: Element): Observable<boolean> {\n const elementBlur$ = tuiTypedFromEvent(element, `blur`);\n const {ownerDocument} = element;\n\n if (!ownerDocument) {\n throw new TuiOwnerDocumentException();\n }\n\n if (!documentMouseDownIsAlive$ || !documentMouseUpIsAlive$) {\n documentMouseUpIsAlive$ = tuiTypedFromEvent(ownerDocument, `mouseup`, {\n capture: true,\n }).pipe(\n tuiIsAlive(),\n startWith(false),\n shareReplay({bufferSize: 1, refCount: true}),\n );\n documentMouseDownIsAlive$ = tuiTypedFromEvent(ownerDocument, `mousedown`, {\n capture: true,\n }).pipe(\n tuiIsAlive(),\n startWith(false),\n shareReplay({bufferSize: 1, refCount: true}),\n );\n }\n\n return merge(\n // focus events excluding ones that came right after mouse action\n concat(\n tuiTypedFromEvent(element, `focus`).pipe(take(1)),\n // filtering out blur events when element remains focused so that we ignore browser tab focus loss\n elementBlur$.pipe(\n filter(() => !tuiIsNativeFocused(element)),\n take(1),\n ignoreElements(),\n ),\n ).pipe(\n repeat(),\n withLatestFrom(\n documentMouseDownIsAlive$,\n documentMouseUpIsAlive$,\n (_event, elementActual, documentActual) =>\n elementActual || documentActual,\n ),\n filter(tuiIsFalsy),\n ),\n ).pipe(\n switchMap(() =>\n elementBlur$.pipe(map(ALWAYS_FALSE_HANDLER), take(1), startWith(true)),\n ),\n distinctUntilChanged(),\n );\n}\n","import {TuiBooleanHandler} from '@taiga-ui/cdk/types';\nimport {EMPTY, Observable, OperatorFunction, pipe} from 'rxjs';\nimport {switchMap} from 'rxjs/operators';\n\nexport function tuiIfMap<T, G>(\n project: (value: T) => Observable<G>,\n predicate: TuiBooleanHandler<T> = Boolean,\n): OperatorFunction<T, G> {\n return pipe(switchMap(value => (predicate(value) ? project(value) : EMPTY)));\n}\n","import {Observer, Subject} from 'rxjs';\n\n/* In RxJS 7 All subjects now have an observed property */\ntype SubjectRxJS7plus<T> = Subject<T> & {observed: boolean};\n\n/* In RxJS 8 `observers` will be removed */\ntype SubjectRxJS6<T> = Subject<T> & {observers: Array<Observer<T>>};\n\nexport function tuiIsObserved<T>(observable: Subject<T>): boolean {\n return `observed` in observable\n ? (observable as SubjectRxJS7plus<T>).observed\n : !!(observable as SubjectRxJS6<T>)?.observers?.length;\n}\n","import {QueryList} from '@angular/core';\nimport {tuiGetOriginalArrayFromQueryList} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {Observable} from 'rxjs';\nimport {map, startWith} from 'rxjs/operators';\n\n/**\n * Converts changes observable of a QueryList to an Observable of arrays\n */\nexport function tuiQueryListChanges<T>(\n queryList: QueryList<T>,\n): Observable<readonly T[]> {\n return queryList.changes.pipe(\n startWith(null),\n map(() => tuiGetOriginalArrayFromQueryList(queryList)),\n );\n}\n\n/**\n * @deprecated An alias, use {@link tuiQueryListChanges} instead\n */\nexport const tuiItemsQueryListObservable = tuiQueryListChanges;\n","import {TuiValuePresentException} from '@taiga-ui/cdk/exceptions';\nimport {tuiIsPresent} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {OperatorFunction} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\nexport function tuiMustBePresent<T>(): OperatorFunction<T | null | undefined, T> {\n return map(value => {\n if (!tuiIsPresent(value)) {\n throw new TuiValuePresentException();\n }\n\n return value;\n });\n}\n","import {ALWAYS_FALSE_HANDLER} from '@taiga-ui/cdk/constants';\nimport {TuiOwnerDocumentException} from '@taiga-ui/cdk/exceptions';\nimport {Observable} from 'rxjs';\nimport {filter, map, startWith, switchMap, take} from 'rxjs/operators';\n\nimport {tuiMouseDragFinishFrom} from './mouse-drag-finish-from';\nimport {tuiTypedFromEvent} from './typed-from-event';\n\nexport interface TuiPressedObservableOptions {\n onlyTrusted: boolean;\n}\n\nexport function tuiPressedObservable(\n element: Element,\n {onlyTrusted}: TuiPressedObservableOptions = {onlyTrusted: true},\n): Observable<boolean> {\n const {ownerDocument} = element;\n\n if (!ownerDocument) {\n throw new TuiOwnerDocumentException();\n }\n\n return tuiTypedFromEvent(element, `mousedown`).pipe(\n filter(({isTrusted}) => isTrusted || !onlyTrusted),\n switchMap(() =>\n tuiMouseDragFinishFrom(ownerDocument).pipe(\n map(ALWAYS_FALSE_HANDLER),\n take(1),\n startWith(true),\n ),\n ),\n );\n}\n","import {MonoTypeOperatorFunction} from 'rxjs';\nimport {tap} from 'rxjs/operators';\n\nexport function tuiPreventDefault<T extends Event>(): MonoTypeOperatorFunction<T> {\n return tap(event => event.preventDefault());\n}\n","import {Observable} from 'rxjs';\n\nimport {tuiTypedFromEvent} from './typed-from-event';\n\n/**\n * Normalizes scroll event in case element is `html` (document.documentElement)\n */\nexport function tuiScrollFrom(element: Element): Observable<Event> {\n return tuiTypedFromEvent(\n element === element.ownerDocument.documentElement\n ? element.ownerDocument\n : element,\n `scroll`,\n );\n}\n","import {MonoTypeOperatorFunction} from 'rxjs';\nimport {tap} from 'rxjs/operators';\n\nexport function tuiStopPropagation<T extends Event>(): MonoTypeOperatorFunction<T> {\n return tap(e => {\n e.stopPropagation();\n });\n}\n","import {ChangeDetectorRef} from '@angular/core';\nimport {MonoTypeOperatorFunction} from 'rxjs';\nimport {tap} from 'rxjs/operators';\n\nexport function tuiWatch<T>(cdr: ChangeDetectorRef): MonoTypeOperatorFunction<T> {\n return tap(() => {\n cdr.markForCheck();\n });\n}\n","import {NgZone} from '@angular/core';\nimport {MonoTypeOperatorFunction, Observable, pipe} from 'rxjs';\n\nexport function tuiZonefull<T>(ngZone: NgZone): MonoTypeOperatorFunction<T> {\n return source =>\n new Observable(subscriber =>\n source.subscribe({\n next: value => ngZone.run(() => subscriber.next(value)),\n error: (error: unknown) => ngZone.run(() => subscriber.error(error)),\n complete: () => ngZone.run(() => subscriber.complete()),\n }),\n );\n}\n\nexport function tuiZonefree<T>(ngZone: NgZone): MonoTypeOperatorFunction<T> {\n return source =>\n new Observable(subscriber =>\n ngZone.runOutsideAngular(() => source.subscribe(subscriber)),\n );\n}\n\nexport function tuiZoneOptimized<T>(ngZone: NgZone): MonoTypeOperatorFunction<T> {\n return pipe(tuiZonefree(ngZone), tuiZonefull(ngZone));\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAKA;;AAEG;AACG,SAAU,eAAe,CAC3B,OAAmD,EAAA;AAEnD,IAAA,OAAO,IAAI,UAAU,CAAC,UAAU,IAAG;AAC/B,QAAA,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE;YACvB,MAAM,IAAI,wBAAwB,EAAE,CAAC;AACxC,SAAA;AAED,QAAA,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;AAC9E,KAAC,CAAC,CAAC;AACP;;ACkBM,SAAU,iBAAiB,CAC7B,MAA8B,EAC9B,KAAa,EACb,UAAmC,EAAE,EAAA;AAErC;;;AAGG;IACH,OAAO,SAAS,CAAI,MAAa,EAAE,KAAK,EAAE,OAAO,CAA6B,CAAC;AACnF;;ACzCA;;;AAGG;AACG,SAAU,sBAAsB,CAEpC,MAAwB,EAAA;AACtB,IAAA,OAAO,KAAK,CACR,iBAAiB,C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U,CAAC,CAAC,CAC/D,CAAC;AACV,CAAC;AAEK,SAAU,gBAAgB,CAAI,MAAc,EAAA;AAC9C,IAAA,OAAO,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC;AAC1D;;ACvBA;;AAEG;;;;"}
|
@@ -325,7 +325,12 @@ class TuiStaticRequestService {
|
|
325
325
|
* TODO: drop after browser support bump
|
326
326
|
*/
|
327
327
|
defer(() => from(fetch(url)));
|
328
|
-
const piped = response$.pipe(switchMap((
|
328
|
+
const piped = response$.pipe(switchMap((response) => __awaiter(this, void 0, void 0, function* () {
|
329
|
+
if (response.ok) {
|
330
|
+
return response.text();
|
331
|
+
}
|
332
|
+
throw new Error(`Failed to load ${url} (${response.statusText})`);
|
333
|
+
})), shareReplay({ bufferSize: 1, refCount: false }));
|
329
334
|
this.cache.set(url, piped);
|
330
335
|
return piped;
|
331
336
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"taiga-ui-cdk-services.js","sources":["../../../projects/cdk/services/destroy.service.ts","../../../projects/cdk/services/directive-styles.service.ts","../../../projects/cdk/services/focus-visible.service.ts","../../../projects/cdk/services/id.service.ts","../../../projects/cdk/services/parents-scroll.service.ts","../../../projects/cdk/services/obscured.service.ts","../../../projects/cdk/services/pan.service.ts","../../../projects/cdk/services/resize.service.ts","../../../projects/cdk/services/scroll.service.ts","../../../projects/cdk/services/static-request.service.ts","../../../projects/cdk/services/swipe.service.ts","../../../projects/cdk/services/zoom.service.ts","../../../projects/cdk/services/taiga-ui-cdk-services.ts"],"sourcesContent":["import {Injectable, OnDestroy} from '@angular/core';\nimport {ReplaySubject} from 'rxjs';\n\n/**\n * @note:\n * Observable abstraction over ngOnDestroy to use with takeUntil\n *\n * Why we use `ReplaySubject` instead of `Subject`?\n * Well, we’ll use ReplaySubject to emit the last message in case\n * the subscription is ended after the component is destroyed.\n */\n@Injectable()\nexport class TuiDestroyService extends ReplaySubject<void> implements OnDestroy {\n constructor() {\n super(1);\n }\n\n ngOnDestroy(): void {\n this.next();\n this.complete();\n }\n}\n","import {\n ComponentFactoryResolver,\n Inject,\n Injectable,\n INJECTOR,\n Injector,\n Type,\n} from '@angular/core';\n\n/**\n * Service to use styles with directives\n */\n@Injectable({\n providedIn: `root`,\n})\nexport class TuiDirectiveStylesService {\n private readonly map = new Map<Type<unknown>, unknown>();\n\n constructor(\n @Inject(ComponentFactoryResolver)\n private readonly resolver: ComponentFactoryResolver,\n @Inject(INJECTOR) private readonly injector: Injector,\n ) {}\n\n addComponent(component: Type<unknown>): void {\n if (!this.map.has(component)) {\n this.map.set(\n component,\n this.resolver.resolveComponentFactory(component).create(this.injector),\n );\n }\n }\n}\n","import {ChangeDetectorRef, ElementRef, Inject, Injectable, Self} from '@angular/core';\nimport {tuiFocusVisibleObservable, tuiWatch} from '@taiga-ui/cdk/observables';\nimport {Observable} from 'rxjs';\nimport {takeUntil} from 'rxjs/operators';\n\nimport {TuiDestroyService} from './destroy.service';\n\n/**\n * Service to imitate :focus-visible\n * (https://developer.mozilla.org/en-US/docs/Web/CSS/:focus-visible)\n * in browsers that do not support it\n */\n@Injectable()\nexport class TuiFocusVisibleService extends Observable<boolean> {\n private readonly focusVisible$: Observable<boolean>;\n\n constructor(\n @Inject(ElementRef) {nativeElement}: ElementRef<Element>,\n @Inject(ChangeDetectorRef) cdr: ChangeDetectorRef,\n @Self() @Inject(TuiDestroyService) destroy$: Observable<void>,\n ) {\n super(subscriber => this.focusVisible$.subscribe(subscriber));\n\n this.focusVisible$ = tuiFocusVisibleObservable(nativeElement).pipe(\n tuiWatch(cdr),\n takeUntil(destroy$),\n );\n }\n}\n","import {Injectable} from '@angular/core';\n\nconst TUI = `tui_`;\n\n/**\n * Generates unique ids\n */\n@Injectable({\n providedIn: `root`,\n})\nexport class TuiIdService {\n private static autoId = 0;\n\n generate(): string {\n return `${TUI}${TuiIdService.autoId++}${Date.now()}`;\n }\n}\n","import {ElementRef, Inject, Injectable} from '@angular/core';\nimport {WINDOW} from '@ng-web-apis/common';\nimport {tuiTypedFromEvent} from '@taiga-ui/cdk/observables';\nimport {defer, merge, Observable} from 'rxjs';\n\n/**\n * Service that subscribes to scroll events of all parent elements\n */\n@Injectable()\nexport class TuiParentsScrollService extends Observable<Event> {\n private readonly callback$: Observable<Event>;\n\n constructor(\n // Destructuring here causes memory leak\n @Inject(ElementRef) el: ElementRef<Element>,\n @Inject(WINDOW) win: Window,\n ) {\n super(subscriber => this.callback$.subscribe(subscriber));\n\n this.callback$ = defer(() => {\n let {nativeElement} = el;\n const eventTargets: Array<Element | Window> = [win, nativeElement];\n\n while (nativeElement.parentElement) {\n nativeElement = nativeElement.parentElement;\n eventTargets.push(nativeElement);\n }\n\n return merge(\n ...eventTargets.map<Observable<Event>>(element =>\n tuiTypedFromEvent(element, `scroll`),\n ),\n );\n });\n }\n}\n","import {ElementRef, Inject, Injectable, NgZone, Self} from '@angular/core';\nimport {ANIMATION_FRAME, WINDOW} from '@ng-web-apis/common';\nimport {POLLING_TIME} from '@taiga-ui/cdk/constants';\nimport {tuiZoneOptimized} from '@taiga-ui/cdk/observables';\nimport {tuiGetElementObscures} from '@taiga-ui/cdk/utils/dom';\nimport {fromEvent, merge, Observable} from 'rxjs';\nimport {\n delay,\n distinctUntilChanged,\n map,\n startWith,\n takeUntil,\n throttleTime,\n} from 'rxjs/operators';\n\nimport {TuiDestroyService} from './destroy.service';\nimport {TuiParentsScrollService} from './parents-scroll.service';\n\n// @bad TODO: Consider Intersection Observer with fallback to current implementation\n/**\n * Service that monitors element visibility by subscribing to scrolls\n * and polling with set interval, returns either null or an array\n * of elements that overlap given element edges\n */\n@Injectable()\nexport class TuiObscuredService extends Observable<readonly Element[] | null> {\n private readonly obscured$: Observable<readonly Element[] | null>;\n\n constructor(\n @Inject(TuiParentsScrollService)\n @Self()\n parentsScroll$: TuiParentsScrollService,\n @Inject(ElementRef) {nativeElement}: ElementRef<Element>,\n @Inject(NgZone) ngZone: NgZone,\n @Inject(WINDOW) win: Window,\n @Self() @Inject(TuiDestroyService) destroy$: Observable<void>,\n @Inject(ANIMATION_FRAME) animationFrame$: Observable<number>,\n ) {\n super(subscriber => this.obscured$.subscribe(subscriber));\n\n this.obscured$ = merge(\n // delay is added so it will not interfere with other listeners\n merge(parentsScroll$, fromEvent(win, `resize`)).pipe(delay(0)),\n animationFrame$.pipe(throttleTime(POLLING_TIME)),\n ).pipe(\n map(() => tuiGetElementObscures(nativeElement)),\n startWith(null),\n distinctUntilChanged(),\n tuiZoneOptimized(ngZone),\n takeUntil(destroy$),\n );\n }\n}\n","import {DOCUMENT} from '@angular/common';\nimport {ElementRef, Inject, Injectable} from '@angular/core';\nimport {tuiTypedFromEvent} from '@taiga-ui/cdk/observables';\nimport {merge, Observable} from 'rxjs';\nimport {filter, map, pairwise, repeat, switchMap, takeUntil} from 'rxjs/operators';\n\n@Injectable()\nexport class TuiPanService extends Observable<readonly [number, number]> {\n constructor(\n @Inject(ElementRef) {nativeElement}: ElementRef<Element>,\n @Inject(DOCUMENT) doc: Document,\n ) {\n super(subscriber => {\n merge(\n tuiTypedFromEvent(nativeElement, `touchstart`, {passive: true}),\n tuiTypedFromEvent(nativeElement, `mousedown`),\n )\n .pipe(\n switchMap(() =>\n merge(\n tuiTypedFromEvent(doc, `touchmove`, {\n passive: true,\n }).pipe(\n filter(({touches}) => touches.length < 2),\n map(({touches}) => touches[0]),\n ),\n tuiTypedFromEvent(doc, `mousemove`),\n ),\n ),\n pairwise(),\n map(([first, second]) => {\n const deltaX = second.clientX - first.clientX;\n const deltaY = second.clientY - first.clientY;\n\n return [deltaX, deltaY] as [number, number];\n }),\n // eslint-disable-next-line rxjs/no-unsafe-takeuntil\n takeUntil(\n merge(\n tuiTypedFromEvent(doc, `touchend`),\n tuiTypedFromEvent(doc, `mouseup`),\n ),\n ),\n repeat(),\n )\n .subscribe(subscriber);\n });\n }\n}\n","import {ElementRef, Inject, Injectable, NgZone, Self} from '@angular/core';\nimport {ANIMATION_FRAME} from '@ng-web-apis/common';\nimport {\n RESIZE_OBSERVER_SUPPORT,\n RESIZE_OPTION_BOX,\n ResizeObserverService,\n} from '@ng-web-apis/resize-observer';\nimport {EMPTY_ARRAY, POLLING_TIME} from '@taiga-ui/cdk/constants';\nimport {tuiZonefree} from '@taiga-ui/cdk/observables';\nimport {Observable} from 'rxjs';\nimport {\n catchError,\n debounceTime,\n distinctUntilChanged,\n map,\n share,\n takeUntil,\n throttleTime,\n} from 'rxjs/operators';\n\nimport {TuiDestroyService} from './destroy.service';\n\n@Injectable()\nexport class TuiResizeService extends ResizeObserverService {\n constructor(\n @Inject(ElementRef) el: ElementRef<HTMLElement>,\n @Inject(NgZone) ngZone: NgZone,\n @Self() @Inject(TuiDestroyService) destroy$: Observable<void>,\n @Inject(RESIZE_OBSERVER_SUPPORT) support: boolean,\n @Inject(RESIZE_OPTION_BOX) box: ResizeObserverBoxOptions,\n @Inject(ANIMATION_FRAME) animationFrame$: Observable<number>,\n ) {\n super(el, ngZone, support, box);\n\n return this.pipe(\n catchError(() =>\n /**\n * @note: if not supported ResizeObserver\n * remove `catchError` after supports modern browsers\n */\n animationFrame$.pipe(\n throttleTime(POLLING_TIME),\n map(\n () =>\n `${el.nativeElement.clientWidth} ${el.nativeElement.clientHeight}`,\n ),\n distinctUntilChanged(),\n map(() => EMPTY_ARRAY),\n ),\n ),\n debounceTime(0),\n tuiZonefree(ngZone),\n share(),\n takeUntil(destroy$),\n );\n }\n}\n","import {Inject, Injectable} from '@angular/core';\nimport {ANIMATION_FRAME, PERFORMANCE} from '@ng-web-apis/common';\nimport {tuiAssert} from '@taiga-ui/cdk/classes';\nimport {tuiClamp} from '@taiga-ui/cdk/utils/math';\nimport {tuiEaseInOutQuad} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {defer, Observable, of, timer} from 'rxjs';\nimport {map, switchMap, takeUntil, tap} from 'rxjs/operators';\n\nconst SCROLL_TIME = 300;\n\n@Injectable({\n providedIn: `root`,\n})\nexport class TuiScrollService {\n constructor(\n @Inject(PERFORMANCE) private readonly performanceRef: Performance,\n @Inject(ANIMATION_FRAME) private readonly animationFrame$: Observable<number>,\n ) {}\n\n scroll$(\n elementOrWindow: Element | Window,\n scrollTop: number,\n scrollLeft: number = getX(elementOrWindow),\n duration: number = SCROLL_TIME,\n ): Observable<[number, number]> {\n ngDevMode && tuiAssert.assert(duration >= 0, `Duration cannot be negative`);\n ngDevMode && tuiAssert.assert(scrollTop >= 0, `scrollTop cannot be negative`);\n ngDevMode && tuiAssert.assert(scrollLeft >= 0, `scrollLeft cannot be negative`);\n\n const initialTop = getY(elementOrWindow);\n const initialLeft = getX(elementOrWindow);\n const deltaTop = scrollTop - initialTop;\n const deltaLeft = scrollLeft - initialLeft;\n const observable = !duration\n ? of([scrollTop, scrollLeft] as [number, number])\n : defer(() => of(this.performanceRef.now())).pipe(\n switchMap(start => this.animationFrame$.pipe(map(now => now - start))),\n map(elapsed => tuiEaseInOutQuad(tuiClamp(elapsed / duration, 0, 1))),\n map(\n percent =>\n [\n initialTop + deltaTop * percent,\n initialLeft + deltaLeft * percent,\n ] as [number, number],\n ),\n takeUntil(timer(duration)),\n );\n\n return observable.pipe(\n tap(([scrollTop, scrollLeft]) => {\n elementOrWindow.scrollTo?.(scrollLeft, scrollTop);\n }),\n );\n }\n}\n\nfunction getX(elementOrWindow: Element | Window): number {\n return `scrollX` in elementOrWindow\n ? elementOrWindow.scrollX\n : elementOrWindow.scrollLeft;\n}\n\nfunction getY(elementOrWindow: Element | Window): number {\n return `scrollY` in elementOrWindow\n ? elementOrWindow.scrollY\n : elementOrWindow.scrollTop;\n}\n","import {isPlatformServer} from '@angular/common';\nimport {Inject, Injectable, PLATFORM_ID} from '@angular/core';\nimport {WINDOW} from '@ng-web-apis/common';\nimport {defer, from, Observable} from 'rxjs';\nimport {fromFetch} from 'rxjs/fetch';\nimport {shareReplay, switchMap} from 'rxjs/operators';\n\n@Injectable({\n providedIn: `root`,\n})\nexport class TuiStaticRequestService {\n private readonly cache = new Map<string, Observable<string>>();\n\n constructor(\n @Inject(WINDOW) private readonly win: Window,\n @Inject(PLATFORM_ID) private readonly platformId: Record<string, unknown>,\n ) {}\n\n request(url: string): Observable<string> {\n const cache = this.cache.get(url);\n\n if (cache) {\n return cache;\n }\n\n const response$ =\n `AbortController` in this.win || isPlatformServer(this.platformId)\n ? fromFetch(url)\n : /**\n * Fallback for Firefox 55 and 56\n * TODO: drop after browser support bump\n */\n defer(() => from(fetch(url)));\n\n const piped = response$.pipe(\n switchMap(async res => res.text()),\n shareReplay({bufferSize: 1, refCount: false}),\n );\n\n this.cache.set(url, piped);\n\n return piped;\n }\n}\n","import {DOCUMENT} from '@angular/common';\nimport {ElementRef, Inject, Injectable} from '@angular/core';\nimport {TuiSwipe, TuiSwipeOptions} from '@taiga-ui/cdk/interfaces';\nimport {tuiTypedFromEvent} from '@taiga-ui/cdk/observables';\nimport {TUI_SWIPE_OPTIONS} from '@taiga-ui/cdk/tokens';\nimport {tuiGetSwipeDirection, tuiIsPresent} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {merge, Observable} from 'rxjs';\nimport {filter, map, pairwise} from 'rxjs/operators';\n\n@Injectable()\nexport class TuiSwipeService extends Observable<TuiSwipe> {\n constructor(\n @Inject(ElementRef) {nativeElement}: ElementRef<Element>,\n @Inject(TUI_SWIPE_OPTIONS) {timeout, threshold}: TuiSwipeOptions,\n @Inject(DOCUMENT) doc: Document,\n ) {\n super(subscriber => {\n merge(\n tuiTypedFromEvent(nativeElement, `touchstart`, {passive: true}),\n tuiTypedFromEvent(doc, `touchend`),\n )\n .pipe(\n pairwise(),\n filter(\n ([first, second]) =>\n !!first.touches.length &&\n first.touches[0].identifier ===\n second.changedTouches[0].identifier,\n ),\n map(([start, end]) => {\n const startX = start.touches[0].clientX;\n const startY = start.touches[0].clientY;\n const endX = end.changedTouches[0].clientX;\n const endY = end.changedTouches[0].clientY;\n\n const distanceX = startX - endX;\n const distanceY = startY - endY;\n const duration = end.timeStamp - start.timeStamp;\n\n if (\n (Math.abs(distanceX) > threshold ||\n Math.abs(distanceY) > threshold) &&\n duration < timeout\n ) {\n return {\n direction: tuiGetSwipeDirection(distanceX, distanceY),\n events: [start, end] as [TouchEvent, TouchEvent],\n };\n }\n\n return null;\n }),\n filter(tuiIsPresent),\n )\n .subscribe(subscriber);\n });\n }\n}\n","import {ElementRef, Inject, Injectable} from '@angular/core';\nimport {TuiZoom, TuiZoomOptions} from '@taiga-ui/cdk/interfaces';\nimport {tuiPreventDefault, tuiTypedFromEvent} from '@taiga-ui/cdk/observables';\nimport {TUI_ZOOM_OPTIONS} from '@taiga-ui/cdk/tokens';\nimport {tuiDistanceBetweenTouches} from '@taiga-ui/cdk/utils';\nimport {merge, Observable} from 'rxjs';\nimport {filter, map, scan, switchMap, takeUntil} from 'rxjs/operators';\n\nconst TOUCH_SENSITIVITY = 0.01;\n\n@Injectable()\nexport class TuiZoomService extends Observable<TuiZoom> {\n constructor(\n @Inject(ElementRef) {nativeElement}: ElementRef<HTMLElement>,\n @Inject(TUI_ZOOM_OPTIONS) {wheelSensitivity}: TuiZoomOptions,\n ) {\n super(subscriber => {\n merge(\n tuiTypedFromEvent(nativeElement, `touchstart`, {passive: true}).pipe(\n filter(({touches}) => touches.length > 1),\n switchMap(startEvent =>\n tuiTypedFromEvent(nativeElement, `touchmove`, {\n passive: true,\n }).pipe(\n tuiPreventDefault(),\n scan(\n (prev, event) => {\n const distance = tuiDistanceBetweenTouches(event);\n\n return {\n event,\n distance,\n delta:\n (distance - prev.distance) *\n TOUCH_SENSITIVITY,\n };\n },\n {\n event: startEvent,\n distance: tuiDistanceBetweenTouches(startEvent),\n delta: 0,\n },\n ),\n map(({event, delta}) => {\n const clientX =\n (event.touches[0].clientX +\n event.touches[1].clientX) /\n 2;\n const clientY =\n (event.touches[0].clientY +\n event.touches[1].clientY) /\n 2;\n\n return {clientX, clientY, delta, event};\n }),\n takeUntil(tuiTypedFromEvent(nativeElement, `touchend`)),\n ),\n ),\n ),\n tuiTypedFromEvent(nativeElement, `wheel`, {passive: false}).pipe(\n tuiPreventDefault(),\n map(wheel => ({\n clientX: wheel.clientX,\n clientY: wheel.clientY,\n delta: -wheel.deltaY * wheelSensitivity,\n event: wheel,\n })),\n ),\n ).subscribe(subscriber);\n });\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAGA;;;;;;;AAOG;AAEG,MAAO,iBAAkB,SAAQ,aAAmB,CAAA;AACtD,IAAA,WAAA,GAAA;QACI,KAAK,CAAC,CAAC,CAAC,CAAC;KACZ;IAED,WAAW,GAAA;QACP,IAAI,CAAC,IAAI,EAAE,CAAC;QACZ,IAAI,CAAC,QAAQ,EAAE,CAAC;KACnB;;+GARQ,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;mHAAjB,iBAAiB,EAAA,CAAA,CAAA;4FAAjB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAD7B,UAAU;;;ACFX;;AAEG;MAIU,yBAAyB,CAAA;IAGlC,WAEqB,CAAA,QAAkC,EAChB,QAAkB,EAAA;QADpC,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAA0B;QAChB,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAAU;AALxC,QAAA,IAAA,CAAA,GAAG,GAAG,IAAI,GAAG,EAA0B,CAAC;KAMrD;AAEJ,IAAA,YAAY,CAAC,SAAwB,EAAA;QACjC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE;YAC1B,IAAI,CAAC,GAAG,CAAC,GAAG,CACR,SAAS,EACT,IAAI,CAAC,QAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CACzE,CAAC;AACL,SAAA;KACJ;;uHAh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;AACtB,gBAAA,KAAK,EAAE,CAAC,KAAK,CAAC,MAAM,GAAG,gBAAgB;AACvC,gBAAA,KAAK,EAAE,KAAK;aACf,CAAC,CAAC,CACN,CACJ,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;AAC5B,SAAC,CAAC,CAAC;KACN;;4GA3DQ,cAAc,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAEX,UAAU,EAAA,EAAA,EAAA,KAAA,EACV,gBAAgB,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;gHAHnB,cAAc,EAAA,CAAA,CAAA;4FAAd,cAAc,EAAA,UAAA,EAAA,CAAA;kBAD1B,UAAU;;0BAGF,MAAM;2BAAC,UAAU,CAAA;;0BACjB,MAAM;2BAAC,gBAAgB,CAAA;;;ACdhC;;AAEG;;;;"}
|
1
|
+
{"version":3,"file":"taiga-ui-cdk-services.js","sources":["../../../projects/cdk/services/destroy.service.ts","../../../projects/cdk/services/directive-styles.service.ts","../../../projects/cdk/services/focus-visible.service.ts","../../../projects/cdk/services/id.service.ts","../../../projects/cdk/services/parents-scroll.service.ts","../../../projects/cdk/services/obscured.service.ts","../../../projects/cdk/services/pan.service.ts","../../../projects/cdk/services/resize.service.ts","../../../projects/cdk/services/scroll.service.ts","../../../projects/cdk/services/static-request.service.ts","../../../projects/cdk/services/swipe.service.ts","../../../projects/cdk/services/zoom.service.ts","../../../projects/cdk/services/taiga-ui-cdk-services.ts"],"sourcesContent":["import {Injectable, OnDestroy} from '@angular/core';\nimport {ReplaySubject} from 'rxjs';\n\n/**\n * @note:\n * Observable abstraction over ngOnDestroy to use with takeUntil\n *\n * Why we use `ReplaySubject` instead of `Subject`?\n * Well, we’ll use ReplaySubject to emit the last message in case\n * the subscription is ended after the component is destroyed.\n */\n@Injectable()\nexport class TuiDestroyService extends ReplaySubject<void> implements OnDestroy {\n constructor() {\n super(1);\n }\n\n ngOnDestroy(): void {\n this.next();\n this.complete();\n }\n}\n","import {\n ComponentFactoryResolver,\n Inject,\n Injectable,\n INJECTOR,\n Injector,\n Type,\n} from '@angular/core';\n\n/**\n * Service to use styles with directives\n */\n@Injectable({\n providedIn: `root`,\n})\nexport class TuiDirectiveStylesService {\n private readonly map = new Map<Type<unknown>, unknown>();\n\n constructor(\n @Inject(ComponentFactoryResolver)\n private readonly resolver: ComponentFactoryResolver,\n @Inject(INJECTOR) private readonly injector: Injector,\n ) {}\n\n addComponent(component: Type<unknown>): void {\n if (!this.map.has(component)) {\n this.map.set(\n component,\n this.resolver.resolveComponentFactory(component).create(this.injector),\n );\n }\n }\n}\n","import {ChangeDetectorRef, ElementRef, Inject, Injectable, Self} from '@angular/core';\nimport {tuiFocusVisibleObservable, tuiWatch} from '@taiga-ui/cdk/observables';\nimport {Observable} from 'rxjs';\nimport {takeUntil} from 'rxjs/operators';\n\nimport {TuiDestroyService} from './destroy.service';\n\n/**\n * Service to imitate :focus-visible\n * (https://developer.mozilla.org/en-US/docs/Web/CSS/:focus-visible)\n * in browsers that do not support it\n */\n@Injectable()\nexport class TuiFocusVisibleService extends Observable<boolean> {\n private readonly focusVisible$: Observable<boolean>;\n\n constructor(\n @Inject(ElementRef) {nativeElement}: ElementRef<Element>,\n @Inject(ChangeDetectorRef) cdr: ChangeDetectorRef,\n @Self() @Inject(TuiDestroyService) destroy$: Observable<void>,\n ) {\n super(subscriber => this.focusVisible$.subscribe(subscriber));\n\n this.focusVisible$ = tuiFocusVisibleObservable(nativeElement).pipe(\n tuiWatch(cdr),\n takeUntil(destroy$),\n );\n }\n}\n","import {Injectable} from '@angular/core';\n\nconst TUI = `tui_`;\n\n/**\n * Generates unique ids\n */\n@Injectable({\n providedIn: `root`,\n})\nexport class TuiIdService {\n private static autoId = 0;\n\n generate(): string {\n return `${TUI}${TuiIdService.autoId++}${Date.now()}`;\n }\n}\n","import {ElementRef, Inject, Injectable} from '@angular/core';\nimport {WINDOW} from '@ng-web-apis/common';\nimport {tuiTypedFromEvent} from '@taiga-ui/cdk/observables';\nimport {defer, merge, Observable} from 'rxjs';\n\n/**\n * Service that subscribes to scroll events of all parent elements\n */\n@Injectable()\nexport class TuiParentsScrollService extends Observable<Event> {\n private readonly callback$: Observable<Event>;\n\n constructor(\n // Destructuring here causes memory leak\n @Inject(ElementRef) el: ElementRef<Element>,\n @Inject(WINDOW) win: Window,\n ) {\n super(subscriber => this.callback$.subscribe(subscriber));\n\n this.callback$ = defer(() => {\n let {nativeElement} = el;\n const eventTargets: Array<Element | Window> = [win, nativeElement];\n\n while (nativeElement.parentElement) {\n nativeElement = nativeElement.parentElement;\n eventTargets.push(nativeElement);\n }\n\n return merge(\n ...eventTargets.map<Observable<Event>>(element =>\n tuiTypedFromEvent(element, `scroll`),\n ),\n );\n });\n }\n}\n","import {ElementRef, Inject, Injectable, NgZone, Self} from '@angular/core';\nimport {ANIMATION_FRAME, WINDOW} from '@ng-web-apis/common';\nimport {POLLING_TIME} from '@taiga-ui/cdk/constants';\nimport {tuiZoneOptimized} from '@taiga-ui/cdk/observables';\nimport {tuiGetElementObscures} from '@taiga-ui/cdk/utils/dom';\nimport {fromEvent, merge, Observable} from 'rxjs';\nimport {\n delay,\n distinctUntilChanged,\n map,\n startWith,\n takeUntil,\n throttleTime,\n} from 'rxjs/operators';\n\nimport {TuiDestroyService} from './destroy.service';\nimport {TuiParentsScrollService} from './parents-scroll.service';\n\n// @bad TODO: Consider Intersection Observer with fallback to current implementation\n/**\n * Service that monitors element visibility by subscribing to scrolls\n * and polling with set interval, returns either null or an array\n * of elements that overlap given element edges\n */\n@Injectable()\nexport class TuiObscuredService extends Observable<readonly Element[] | null> {\n private readonly obscured$: Observable<readonly Element[] | null>;\n\n constructor(\n @Inject(TuiParentsScrollService)\n @Self()\n parentsScroll$: TuiParentsScrollService,\n @Inject(ElementRef) {nativeElement}: ElementRef<Element>,\n @Inject(NgZone) ngZone: NgZone,\n @Inject(WINDOW) win: Window,\n @Self() @Inject(TuiDestroyService) destroy$: Observable<void>,\n @Inject(ANIMATION_FRAME) animationFrame$: Observable<number>,\n ) {\n super(subscriber => this.obscured$.subscribe(subscriber));\n\n this.obscured$ = merge(\n // delay is added so it will not interfere with other listeners\n merge(parentsScroll$, fromEvent(win, `resize`)).pipe(delay(0)),\n animationFrame$.pipe(throttleTime(POLLING_TIME)),\n ).pipe(\n map(() => tuiGetElementObscures(nativeElement)),\n startWith(null),\n distinctUntilChanged(),\n tuiZoneOptimized(ngZone),\n takeUntil(destroy$),\n );\n }\n}\n","import {DOCUMENT} from '@angular/common';\nimport {ElementRef, Inject, Injectable} from '@angular/core';\nimport {tuiTypedFromEvent} from '@taiga-ui/cdk/observables';\nimport {merge, Observable} from 'rxjs';\nimport {filter, map, pairwise, repeat, switchMap, takeUntil} from 'rxjs/operators';\n\n@Injectable()\nexport class TuiPanService extends Observable<readonly [number, number]> {\n constructor(\n @Inject(ElementRef) {nativeElement}: ElementRef<Element>,\n @Inject(DOCUMENT) doc: Document,\n ) {\n super(subscriber => {\n merge(\n tuiTypedFromEvent(nativeElement, `touchstart`, {passive: true}),\n tuiTypedFromEvent(nativeElement, `mousedown`),\n )\n .pipe(\n switchMap(() =>\n merge(\n tuiTypedFromEvent(doc, `touchmove`, {\n passive: true,\n }).pipe(\n filter(({touches}) => touches.length < 2),\n map(({touches}) => touches[0]),\n ),\n tuiTypedFromEvent(doc, `mousemove`),\n ),\n ),\n pairwise(),\n map(([first, second]) => {\n const deltaX = second.clientX - first.clientX;\n const deltaY = second.clientY - first.clientY;\n\n return [deltaX, deltaY] as [number, number];\n }),\n // eslint-disable-next-line rxjs/no-unsafe-takeuntil\n takeUntil(\n merge(\n tuiTypedFromEvent(doc, `touchend`),\n tuiTypedFromEvent(doc, `mouseup`),\n ),\n ),\n repeat(),\n )\n .subscribe(subscriber);\n });\n }\n}\n","import {ElementRef, Inject, Injectable, NgZone, Self} from '@angular/core';\nimport {ANIMATION_FRAME} from '@ng-web-apis/common';\nimport {\n RESIZE_OBSERVER_SUPPORT,\n RESIZE_OPTION_BOX,\n ResizeObserverService,\n} from '@ng-web-apis/resize-observer';\nimport {EMPTY_ARRAY, POLLING_TIME} from '@taiga-ui/cdk/constants';\nimport {tuiZonefree} from '@taiga-ui/cdk/observables';\nimport {Observable} from 'rxjs';\nimport {\n catchError,\n debounceTime,\n distinctUntilChanged,\n map,\n share,\n takeUntil,\n throttleTime,\n} from 'rxjs/operators';\n\nimport {TuiDestroyService} from './destroy.service';\n\n@Injectable()\nexport class TuiResizeService extends ResizeObserverService {\n constructor(\n @Inject(ElementRef) el: ElementRef<HTMLElement>,\n @Inject(NgZone) ngZone: NgZone,\n @Self() @Inject(TuiDestroyService) destroy$: Observable<void>,\n @Inject(RESIZE_OBSERVER_SUPPORT) support: boolean,\n @Inject(RESIZE_OPTION_BOX) box: ResizeObserverBoxOptions,\n @Inject(ANIMATION_FRAME) animationFrame$: Observable<number>,\n ) {\n super(el, ngZone, support, box);\n\n return this.pipe(\n catchError(() =>\n /**\n * @note: if not supported ResizeObserver\n * remove `catchError` after supports modern browsers\n */\n animationFrame$.pipe(\n throttleTime(POLLING_TIME),\n map(\n () =>\n `${el.nativeElement.clientWidth} ${el.nativeElement.clientHeight}`,\n ),\n distinctUntilChanged(),\n map(() => EMPTY_ARRAY),\n ),\n ),\n debounceTime(0),\n tuiZonefree(ngZone),\n share(),\n takeUntil(destroy$),\n );\n }\n}\n","import {Inject, Injectable} from '@angular/core';\nimport {ANIMATION_FRAME, PERFORMANCE} from '@ng-web-apis/common';\nimport {tuiAssert} from '@taiga-ui/cdk/classes';\nimport {tuiClamp} from '@taiga-ui/cdk/utils/math';\nimport {tuiEaseInOutQuad} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {defer, Observable, of, timer} from 'rxjs';\nimport {map, switchMap, takeUntil, tap} from 'rxjs/operators';\n\nconst SCROLL_TIME = 300;\n\n@Injectable({\n providedIn: `root`,\n})\nexport class TuiScrollService {\n constructor(\n @Inject(PERFORMANCE) private readonly performanceRef: Performance,\n @Inject(ANIMATION_FRAME) private readonly animationFrame$: Observable<number>,\n ) {}\n\n scroll$(\n elementOrWindow: Element | Window,\n scrollTop: number,\n scrollLeft: number = getX(elementOrWindow),\n duration: number = SCROLL_TIME,\n ): Observable<[number, number]> {\n ngDevMode && tuiAssert.assert(duration >= 0, `Duration cannot be negative`);\n ngDevMode && tuiAssert.assert(scrollTop >= 0, `scrollTop cannot be negative`);\n ngDevMode && tuiAssert.assert(scrollLeft >= 0, `scrollLeft cannot be negative`);\n\n const initialTop = getY(elementOrWindow);\n const initialLeft = getX(elementOrWindow);\n const deltaTop = scrollTop - initialTop;\n const deltaLeft = scrollLeft - initialLeft;\n const observable = !duration\n ? of([scrollTop, scrollLeft] as [number, number])\n : defer(() => of(this.performanceRef.now())).pipe(\n switchMap(start => this.animationFrame$.pipe(map(now => now - start))),\n map(elapsed => tuiEaseInOutQuad(tuiClamp(elapsed / duration, 0, 1))),\n map(\n percent =>\n [\n initialTop + deltaTop * percent,\n initialLeft + deltaLeft * percent,\n ] as [number, number],\n ),\n takeUntil(timer(duration)),\n );\n\n return observable.pipe(\n tap(([scrollTop, scrollLeft]) => {\n elementOrWindow.scrollTo?.(scrollLeft, scrollTop);\n }),\n );\n }\n}\n\nfunction getX(elementOrWindow: Element | Window): number {\n return `scrollX` in elementOrWindow\n ? elementOrWindow.scrollX\n : elementOrWindow.scrollLeft;\n}\n\nfunction getY(elementOrWindow: Element | Window): number {\n return `scrollY` in elementOrWindow\n ? elementOrWindow.scrollY\n : elementOrWindow.scrollTop;\n}\n","import {isPlatformServer} from '@angular/common';\nimport {Inject, Injectable, PLATFORM_ID} from '@angular/core';\nimport {WINDOW} from '@ng-web-apis/common';\nimport {defer, from, Observable} from 'rxjs';\nimport {fromFetch} from 'rxjs/fetch';\nimport {shareReplay, switchMap} from 'rxjs/operators';\n\n@Injectable({\n providedIn: `root`,\n})\nexport class TuiStaticRequestService {\n private readonly cache = new Map<string, Observable<string>>();\n\n constructor(\n @Inject(WINDOW) private readonly win: Window,\n @Inject(PLATFORM_ID) private readonly platformId: Record<string, unknown>,\n ) {}\n\n request(url: string): Observable<string> {\n const cache = this.cache.get(url);\n\n if (cache) {\n return cache;\n }\n\n const response$ =\n `AbortController` in this.win || isPlatformServer(this.platformId)\n ? fromFetch(url)\n : /**\n * Fallback for Firefox 55 and 56\n * TODO: drop after browser support bump\n */\n defer(() => from(fetch(url)));\n\n const piped = response$.pipe(\n switchMap(async response => {\n if (response.ok) {\n return response.text();\n }\n\n throw new Error(`Failed to load ${url} (${response.statusText})`);\n }),\n shareReplay({bufferSize: 1, refCount: false}),\n );\n\n this.cache.set(url, piped);\n\n return piped;\n }\n}\n","import {DOCUMENT} from '@angular/common';\nimport {ElementRef, Inject, Injectable} from '@angular/core';\nimport {TuiSwipe, TuiSwipeOptions} from '@taiga-ui/cdk/interfaces';\nimport {tuiTypedFromEvent} from '@taiga-ui/cdk/observables';\nimport {TUI_SWIPE_OPTIONS} from '@taiga-ui/cdk/tokens';\nimport {tuiGetSwipeDirection, tuiIsPresent} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {merge, Observable} from 'rxjs';\nimport {filter, map, pairwise} from 'rxjs/operators';\n\n@Injectable()\nexport class TuiSwipeService extends Observable<TuiSwipe> {\n constructor(\n @Inject(ElementRef) {nativeElement}: ElementRef<Element>,\n @Inject(TUI_SWIPE_OPTIONS) {timeout, threshold}: TuiSwipeOptions,\n @Inject(DOCUMENT) doc: Document,\n ) {\n super(subscriber => {\n merge(\n tuiTypedFromEvent(nativeElement, `touchstart`, {passive: true}),\n tuiTypedFromEvent(doc, `touchend`),\n )\n .pipe(\n pairwise(),\n filter(\n ([first, second]) =>\n !!first.touches.length &&\n first.touches[0].identifier ===\n second.changedTouches[0].identifier,\n ),\n map(([start, end]) => {\n const startX = start.touches[0].clientX;\n const startY = start.touches[0].clientY;\n const endX = end.changedTouches[0].clientX;\n const endY = end.changedTouches[0].clientY;\n\n const distanceX = startX - endX;\n const distanceY = startY - endY;\n const duration = end.timeStamp - start.timeStamp;\n\n if (\n (Math.abs(distanceX) > threshold ||\n Math.abs(distanceY) > threshold) &&\n duration < timeout\n ) {\n return {\n direction: tuiGetSwipeDirection(distanceX, distanceY),\n events: [start, end] as [TouchEvent, TouchEvent],\n };\n }\n\n return null;\n }),\n filter(tuiIsPresent),\n )\n .subscribe(subscriber);\n });\n }\n}\n","import {ElementRef, Inject, Injectable} from '@angular/core';\nimport {TuiZoom, TuiZoomOptions} from '@taiga-ui/cdk/interfaces';\nimport {tuiPreventDefault, tuiTypedFromEvent} from '@taiga-ui/cdk/observables';\nimport {TUI_ZOOM_OPTIONS} from '@taiga-ui/cdk/tokens';\nimport {tuiDistanceBetweenTouches} from '@taiga-ui/cdk/utils';\nimport {merge, Observable} from 'rxjs';\nimport {filter, map, scan, switchMap, takeUntil} from 'rxjs/operators';\n\nconst TOUCH_SENSITIVITY = 0.01;\n\n@Injectable()\nexport class TuiZoomService extends Observable<TuiZoom> {\n constructor(\n @Inject(ElementRef) {nativeElement}: ElementRef<HTMLElement>,\n @Inject(TUI_ZOOM_OPTIONS) {wheelSensitivity}: TuiZoomOptions,\n ) {\n super(subscriber => {\n merge(\n tuiTypedFromEvent(nativeElement, `touchstart`, {passive: true}).pipe(\n filter(({touches}) => touches.length > 1),\n switchMap(startEvent =>\n tuiTypedFromEvent(nativeElement, `touchmove`, {\n passive: true,\n }).pipe(\n tuiPreventDefault(),\n scan(\n (prev, event) => {\n const distance = tuiDistanceBetweenTouches(event);\n\n return {\n event,\n distance,\n delta:\n (distance - prev.distance) *\n TOUCH_SENSITIVITY,\n };\n },\n {\n event: startEvent,\n distance: tuiDistanceBetweenTouches(startEvent),\n delta: 0,\n },\n ),\n map(({event, delta}) => {\n const clientX =\n (event.touches[0].clientX +\n event.touches[1].clientX) /\n 2;\n const clientY =\n (event.touches[0].clientY +\n event.touches[1].clientY) /\n 2;\n\n return {clientX, clientY, delta, event};\n }),\n takeUntil(tuiTypedFromEvent(nativeElement, `touchend`)),\n ),\n ),\n ),\n tuiTypedFromEvent(nativeElement, `wheel`, {passive: false}).pipe(\n tuiPreventDefault(),\n map(wheel => ({\n clientX: wheel.clientX,\n clientY: wheel.clientY,\n delta: -wheel.deltaY * wheelSensitivity,\n event: wheel,\n })),\n ),\n ).subscribe(subscriber);\n });\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAGA;;;;;;;AAOG;AAEG,MAAO,iBAAkB,SAAQ,aAAmB,CAAA;AACtD,IAAA,WAAA,GAAA;QACI,KAAK,CAAC,CAAC,CAAC,CAAC;KACZ;IAED,WAAW,GAAA;QACP,IAAI,CAAC,IAAI,EAAE,CAAC;QACZ,IAAI,CAAC,QAAQ,EAAE,CAAC;KACnB;;+GARQ,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;mHAAjB,iBAAiB,EAAA,CAAA,CAAA;4FAAjB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAD7B,UAAU;;;ACFX;;AAEG;MAIU,yBAAyB,CAAA;IAGlC,WAEqB,CAAA,QAAkC,EAChB,QAAkB,EAAA;QADpC,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAA0B;QAChB,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAAU;AALxC,QAAA,IAAA,CAAA,GAAG,GAAG,IAAI,GAAG,EAA0B,CAAC;KAMrD;AAEJ,IAAA,YAAY,CAAC,SAAwB,EAAA;QACjC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE;YAC1B,IAAI,CAAC,GAAG,CAAC,GAAG,CACR,SAAS,EACT,IAAI,CAAC,QAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CACzE,CAAC;AACL,SAAA;KACJ;;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