@taiga-ui/legacy 4.12.0 → 4.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, Directive } from '@angular/core';
2
+ import { inject, DestroyRef, Directive } from '@angular/core';
3
3
  import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
4
4
  import { tuiInjectElement } from '@taiga-ui/cdk/utils/dom';
5
5
  import { tuiGetClosestFocusable } from '@taiga-ui/cdk/utils/focus';
@@ -8,16 +8,16 @@ import { distinctUntilChanged } from 'rxjs';
8
8
 
9
9
  class TuiLegacyDropdownOpenMonitorDirective {
10
10
  constructor() {
11
+ this.destroyRef = inject(DestroyRef);
11
12
  this.el = tuiInjectElement();
12
13
  this.host = inject(TuiDropdownOpen, { self: true });
13
14
  this.external = inject(TuiDropdownOpenLegacy, {
14
15
  optional: true,
15
16
  });
16
- this.$ = this.host.driver
17
- .pipe(distinctUntilChanged(), takeUntilDestroyed())
18
- .subscribe((open) => this.external?.tuiDropdownOpenChange.next(open));
19
- this.$1 = this.external?.tuiDropdownOpenChange
20
- .pipe(distinctUntilChanged(), takeUntilDestroyed())
17
+ }
18
+ ngAfterViewInit() {
19
+ this.external?.tuiDropdownOpenChange
20
+ .pipe(distinctUntilChanged(), takeUntilDestroyed(this.destroyRef))
21
21
  .subscribe((open) => {
22
22
  if (open) {
23
23
  tuiGetClosestFocusable({
@@ -27,6 +27,9 @@ class TuiLegacyDropdownOpenMonitorDirective {
27
27
  }
28
28
  this.host.toggle(open);
29
29
  });
30
+ this.host.driver
31
+ .pipe(distinctUntilChanged(), takeUntilDestroyed(this.destroyRef))
32
+ .subscribe((open) => this.external?.tuiDropdownOpenChange.next(open));
30
33
  }
31
34
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TuiLegacyDropdownOpenMonitorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
32
35
  static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: TuiLegacyDropdownOpenMonitorDirective, isStandalone: true, selector: "[tuiDropdownOpenMonitor]", ngImport: i0 }); }
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-legacy-directives-legacy-dropdown-open-monitor.mjs","sources":["../../../projects/legacy/directives/legacy-dropdown-open-monitor/legacy-dropdown-open-monitor.ts","../../../projects/legacy/directives/legacy-dropdown-open-monitor/taiga-ui-legacy-directives-legacy-dropdown-open-monitor.ts"],"sourcesContent":["import {Directive, inject} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {tuiGetClosestFocusable} from '@taiga-ui/cdk/utils/focus';\nimport {TuiDropdownOpen, TuiDropdownOpenLegacy} from '@taiga-ui/core/directives/dropdown';\nimport {distinctUntilChanged} from 'rxjs';\n\n@Directive({\n standalone: true,\n selector: '[tuiDropdownOpenMonitor]',\n})\nexport class TuiLegacyDropdownOpenMonitorDirective {\n private readonly el = tuiInjectElement();\n private readonly host = inject(TuiDropdownOpen, {self: true});\n private readonly external = inject(TuiDropdownOpenLegacy, {\n optional: true,\n });\n\n protected readonly $ = this.host.driver\n .pipe(distinctUntilChanged(), takeUntilDestroyed())\n .subscribe((open) => this.external?.tuiDropdownOpenChange.next(open));\n\n protected readonly $1 = this.external?.tuiDropdownOpenChange\n .pipe(distinctUntilChanged(), takeUntilDestroyed())\n .subscribe((open) => {\n if (open) {\n tuiGetClosestFocusable({\n initial: this.el,\n root: this.el,\n })?.focus();\n }\n\n this.host.toggle(open);\n });\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAOA,MAIa,qCAAqC,CAAA;AAJlD,IAAA,WAAA,GAAA;QAKqB,IAAE,CAAA,EAAA,GAAG,gBAAgB,EAAE,C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AA,CAAA;AACP,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,0BAA0B;AACvC,iBAAA,CAAA;;;ACVD;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-legacy-directives-legacy-dropdown-open-monitor.mjs","sources":["../../../projects/legacy/directives/legacy-dropdown-open-monitor/legacy-dropdown-open-monitor.ts","../../../projects/legacy/directives/legacy-dropdown-open-monitor/taiga-ui-legacy-directives-legacy-dropdown-open-monitor.ts"],"sourcesContent":["import type {AfterViewInit} from '@angular/core';\nimport {DestroyRef, Directive, inject} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {tuiGetClosestFocusable} from '@taiga-ui/cdk/utils/focus';\nimport {TuiDropdownOpen, TuiDropdownOpenLegacy} from '@taiga-ui/core/directives/dropdown';\nimport {distinctUntilChanged} from 'rxjs';\n\n@Directive({\n standalone: true,\n selector: '[tuiDropdownOpenMonitor]',\n})\nexport class TuiLegacyDropdownOpenMonitorDirective implements AfterViewInit {\n private readonly destroyRef = inject(DestroyRef);\n private readonly el = tuiInjectElement();\n private readonly host = inject(TuiDropdownOpen, {self: true});\n private readonly external = inject(TuiDropdownOpenLegacy, {\n optional: true,\n });\n\n public ngAfterViewInit(): void {\n this.external?.tuiDropdownOpenChange\n .pipe(distinctUntilChanged(), takeUntilDestroyed(this.destroyRef))\n .subscribe((open) => {\n if (open) {\n tuiGetClosestFocusable({\n initial: this.el,\n root: this.el,\n })?.focus();\n }\n\n this.host.toggle(open);\n });\n\n this.host.driver\n .pipe(distinctUntilChanged(), takeUntilDestroyed(this.destroyRef))\n .subscribe((open) => this.external?.tuiDropdownOpenChange.next(open));\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAQA,MAIa,qCAAqC,CAAA;AAJlD,IAAA,WAAA,GAAA;AAKqB,QAAA,IAA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EAAA,CAAA,CAAA,EAAA;;4FAArC,qCAAqC,EAAA,UAAA,EAAA,CAAA;kBAJjD,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,0BAA0B;AACvC,iBAAA,CAAA;;;ACXD;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taiga-ui/legacy",
3
- "version": "4.12.0",
3
+ "version": "4.13.0",
4
4
  "description": "Legacy Taiga UI entities from the previous major release to simplify migration",
5
5
  "keywords": [
6
6
  "legacy",
@@ -2,7 +2,7 @@ import type { TuiStringHandler } from '@taiga-ui/cdk/types';
2
2
  /**
3
3
  * @deprecated: drop in v5.0
4
4
  */
5
- export declare const TUI_CACHE_BUSTING_PAYLOAD: "?v=4.12.0";
5
+ export declare const TUI_CACHE_BUSTING_PAYLOAD: "?v=4.13.0";
6
6
  /**
7
7
  * @deprecated: drop in v5.0
8
8
  */