@taiga-ui/cdk 4.52.0-canary.698642f → 4.52.0-canary.6be767f

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (154) hide show
  1. package/classes/index.d.ts +0 -1
  2. package/constants/used-icons.d.ts +1 -1
  3. package/constants/version.d.ts +1 -1
  4. package/constants/version.js +1 -1
  5. package/date-time/day.d.ts +1 -1
  6. package/directives/active-zone/active-zone.directive.d.ts +4 -3
  7. package/directives/animated/animated.directive.d.ts +0 -1
  8. package/directives/auto-focus/autofocus.options.d.ts +1 -1
  9. package/directives/index.d.ts +1 -0
  10. package/directives/let/let.directive.d.ts +1 -2
  11. package/directives/repeat-times/repeat-times.directive.d.ts +2 -2
  12. package/directives/with-styles/index.d.ts +1 -0
  13. package/directives/with-styles/with-styles.directive.d.ts +10 -0
  14. package/fesm2022/taiga-ui-cdk-classes.mjs +5 -76
  15. package/fesm2022/taiga-ui-cdk-classes.mjs.map +1 -1
  16. package/fesm2022/taiga-ui-cdk-constants.mjs +1 -21
  17. package/fesm2022/taiga-ui-cdk-constants.mjs.map +1 -1
  18. package/fesm2022/taiga-ui-cdk-date-time.mjs +14 -2
  19. package/fesm2022/taiga-ui-cdk-date-time.mjs.map +1 -1
  20. package/fesm2022/taiga-ui-cdk-directives-active-zone.mjs +22 -26
  21. package/fesm2022/taiga-ui-cdk-directives-active-zone.mjs.map +1 -1
  22. package/fesm2022/taiga-ui-cdk-directives-animated.mjs +47 -44
  23. package/fesm2022/taiga-ui-cdk-directives-animated.mjs.map +1 -1
  24. package/fesm2022/taiga-ui-cdk-directives-auto-focus.mjs +3 -3
  25. package/fesm2022/taiga-ui-cdk-directives-auto-focus.mjs.map +1 -1
  26. package/fesm2022/taiga-ui-cdk-directives-click-outside.mjs +3 -3
  27. package/fesm2022/taiga-ui-cdk-directives-click-outside.mjs.map +1 -1
  28. package/fesm2022/taiga-ui-cdk-directives-control.mjs +3 -3
  29. package/fesm2022/taiga-ui-cdk-directives-control.mjs.map +1 -1
  30. package/fesm2022/taiga-ui-cdk-directives-copy-processor.mjs +3 -3
  31. package/fesm2022/taiga-ui-cdk-directives-copy-processor.mjs.map +1 -1
  32. package/fesm2022/taiga-ui-cdk-directives-droppable.mjs +3 -3
  33. package/fesm2022/taiga-ui-cdk-directives-droppable.mjs.map +1 -1
  34. package/fesm2022/taiga-ui-cdk-directives-element.mjs +3 -3
  35. package/fesm2022/taiga-ui-cdk-directives-element.mjs.map +1 -1
  36. package/fesm2022/taiga-ui-cdk-directives-focus-trap.mjs +10 -18
  37. package/fesm2022/taiga-ui-cdk-directives-focus-trap.mjs.map +1 -1
  38. package/fesm2022/taiga-ui-cdk-directives-font-size.mjs +3 -3
  39. package/fesm2022/taiga-ui-cdk-directives-font-size.mjs.map +1 -1
  40. package/fesm2022/taiga-ui-cdk-directives-high-dpi.mjs +3 -3
  41. package/fesm2022/taiga-ui-cdk-directives-high-dpi.mjs.map +1 -1
  42. package/fesm2022/taiga-ui-cdk-directives-hovered.mjs +6 -6
  43. package/fesm2022/taiga-ui-cdk-directives-hovered.mjs.map +1 -1
  44. package/fesm2022/taiga-ui-cdk-directives-item.mjs +3 -3
  45. package/fesm2022/taiga-ui-cdk-directives-item.mjs.map +1 -1
  46. package/fesm2022/taiga-ui-cdk-directives-let.mjs +4 -5
  47. package/fesm2022/taiga-ui-cdk-directives-let.mjs.map +1 -1
  48. package/fesm2022/taiga-ui-cdk-directives-media.mjs +3 -3
  49. package/fesm2022/taiga-ui-cdk-directives-media.mjs.map +1 -1
  50. package/fesm2022/taiga-ui-cdk-directives-native-validator.mjs +3 -3
  51. package/fesm2022/taiga-ui-cdk-directives-native-validator.mjs.map +1 -1
  52. package/fesm2022/taiga-ui-cdk-directives-obscured.mjs +13 -7
  53. package/fesm2022/taiga-ui-cdk-directives-obscured.mjs.map +1 -1
  54. package/fesm2022/taiga-ui-cdk-directives-pan.mjs +6 -6
  55. package/fesm2022/taiga-ui-cdk-directives-pan.mjs.map +1 -1
  56. package/fesm2022/taiga-ui-cdk-directives-platform.mjs +3 -3
  57. package/fesm2022/taiga-ui-cdk-directives-platform.mjs.map +1 -1
  58. package/fesm2022/taiga-ui-cdk-directives-popover.mjs +3 -3
  59. package/fesm2022/taiga-ui-cdk-directives-popover.mjs.map +1 -1
  60. package/fesm2022/taiga-ui-cdk-directives-repeat-times.mjs +9 -9
  61. package/fesm2022/taiga-ui-cdk-directives-repeat-times.mjs.map +1 -1
  62. package/fesm2022/taiga-ui-cdk-directives-resizer.mjs +6 -6
  63. package/fesm2022/taiga-ui-cdk-directives-resizer.mjs.map +1 -1
  64. package/fesm2022/taiga-ui-cdk-directives-swipe.mjs +6 -6
  65. package/fesm2022/taiga-ui-cdk-directives-swipe.mjs.map +1 -1
  66. package/fesm2022/taiga-ui-cdk-directives-transitioned.mjs +3 -3
  67. package/fesm2022/taiga-ui-cdk-directives-transitioned.mjs.map +1 -1
  68. package/fesm2022/taiga-ui-cdk-directives-validator.mjs +3 -3
  69. package/fesm2022/taiga-ui-cdk-directives-validator.mjs.map +1 -1
  70. package/fesm2022/taiga-ui-cdk-directives-value-changes.mjs +3 -3
  71. package/fesm2022/taiga-ui-cdk-directives-value-changes.mjs.map +1 -1
  72. package/fesm2022/taiga-ui-cdk-directives-visual-viewport.mjs +3 -3
  73. package/fesm2022/taiga-ui-cdk-directives-visual-viewport.mjs.map +1 -1
  74. package/fesm2022/taiga-ui-cdk-directives-with-styles.mjs +29 -0
  75. package/fesm2022/taiga-ui-cdk-directives-with-styles.mjs.map +1 -0
  76. package/fesm2022/taiga-ui-cdk-directives-zoom.mjs +6 -6
  77. package/fesm2022/taiga-ui-cdk-directives-zoom.mjs.map +1 -1
  78. package/fesm2022/taiga-ui-cdk-directives.mjs +1 -0
  79. package/fesm2022/taiga-ui-cdk-directives.mjs.map +1 -1
  80. package/fesm2022/taiga-ui-cdk-observables.mjs.map +1 -1
  81. package/fesm2022/taiga-ui-cdk-pipes-animation.mjs +3 -3
  82. package/fesm2022/taiga-ui-cdk-pipes-animation.mjs.map +1 -1
  83. package/fesm2022/taiga-ui-cdk-pipes-filter.mjs +3 -3
  84. package/fesm2022/taiga-ui-cdk-pipes-filter.mjs.map +1 -1
  85. package/fesm2022/taiga-ui-cdk-pipes-is-present.mjs +3 -3
  86. package/fesm2022/taiga-ui-cdk-pipes-is-present.mjs.map +1 -1
  87. package/fesm2022/taiga-ui-cdk-pipes-keys.mjs +3 -3
  88. package/fesm2022/taiga-ui-cdk-pipes-keys.mjs.map +1 -1
  89. package/fesm2022/taiga-ui-cdk-pipes-mapper.mjs +3 -3
  90. package/fesm2022/taiga-ui-cdk-pipes-mapper.mjs.map +1 -1
  91. package/fesm2022/taiga-ui-cdk-pipes-obfuscate.mjs +3 -3
  92. package/fesm2022/taiga-ui-cdk-pipes-obfuscate.mjs.map +1 -1
  93. package/fesm2022/taiga-ui-cdk-pipes-repeat-times.mjs +3 -3
  94. package/fesm2022/taiga-ui-cdk-pipes-repeat-times.mjs.map +1 -1
  95. package/fesm2022/taiga-ui-cdk-pipes-replace.mjs +3 -3
  96. package/fesm2022/taiga-ui-cdk-pipes-replace.mjs.map +1 -1
  97. package/fesm2022/taiga-ui-cdk-pipes-to-array.mjs +3 -3
  98. package/fesm2022/taiga-ui-cdk-pipes-to-array.mjs.map +1 -1
  99. package/fesm2022/taiga-ui-cdk-portals.mjs +113 -0
  100. package/fesm2022/taiga-ui-cdk-portals.mjs.map +1 -0
  101. package/fesm2022/taiga-ui-cdk-services.mjs +12 -12
  102. package/fesm2022/taiga-ui-cdk-services.mjs.map +1 -1
  103. package/fesm2022/taiga-ui-cdk-tokens.mjs +9 -8
  104. package/fesm2022/taiga-ui-cdk-tokens.mjs.map +1 -1
  105. package/fesm2022/taiga-ui-cdk-utils-color.mjs.map +1 -1
  106. package/fesm2022/taiga-ui-cdk-utils-di.mjs +1 -2
  107. package/fesm2022/taiga-ui-cdk-utils-di.mjs.map +1 -1
  108. package/fesm2022/taiga-ui-cdk-utils-dom.mjs +14 -21
  109. package/fesm2022/taiga-ui-cdk-utils-dom.mjs.map +1 -1
  110. package/fesm2022/taiga-ui-cdk-utils-focus.mjs +13 -14
  111. package/fesm2022/taiga-ui-cdk-utils-focus.mjs.map +1 -1
  112. package/fesm2022/taiga-ui-cdk-utils-math.mjs.map +1 -1
  113. package/fesm2022/taiga-ui-cdk-utils-miscellaneous.mjs +5 -10
  114. package/fesm2022/taiga-ui-cdk-utils-miscellaneous.mjs.map +1 -1
  115. package/fesm2022/taiga-ui-cdk.mjs +1 -0
  116. package/fesm2022/taiga-ui-cdk.mjs.map +1 -1
  117. package/index.d.ts +1 -0
  118. package/package.json +21 -13
  119. package/pipes/obfuscate/obfuscate.options.d.ts +1 -1
  120. package/portals/index.d.ts +3 -0
  121. package/portals/portal.d.ts +24 -0
  122. package/portals/portals.d.ts +15 -0
  123. package/portals/service.d.ts +19 -0
  124. package/schematics/ng-add/constants/versions.d.ts +1 -1
  125. package/schematics/ng-update/{v4/steps → utils}/replace-functions.d.ts +1 -1
  126. package/schematics/ng-update/{v4/steps → utils}/replace-functions.js +1 -1
  127. package/schematics/ng-update/utils/replace-functions.js.map +1 -0
  128. package/schematics/ng-update/v4/index.js +1 -1
  129. package/schematics/ng-update/v4/index.js.map +1 -1
  130. package/schematics/ng-update/v5/index.js +9 -0
  131. package/schematics/ng-update/v5/index.js.map +1 -1
  132. package/schematics/ng-update/v5/steps/constants/functions.d.ts +2 -0
  133. package/schematics/ng-update/v5/steps/constants/functions.js +36 -0
  134. package/schematics/ng-update/v5/steps/constants/functions.js.map +1 -0
  135. package/schematics/ng-update/v5/steps/constants/html-comments.d.ts +2 -0
  136. package/schematics/ng-update/v5/steps/constants/html-comments.js +11 -0
  137. package/schematics/ng-update/v5/steps/constants/html-comments.js.map +1 -0
  138. package/schematics/ng-update/v5/steps/migrate-templates.d.ts +17 -0
  139. package/schematics/ng-update/v5/steps/migrate-templates.js +40 -0
  140. package/schematics/ng-update/v5/steps/migrate-templates.js.map +1 -0
  141. package/tokens/environment.d.ts +5 -0
  142. package/utils/di/create-options.d.ts +2 -2
  143. package/utils/dom/get-element-obscurers.d.ts +1 -1
  144. package/utils/focus/blur-native-focused.d.ts +1 -1
  145. package/utils/focus/get-native-focused.d.ts +1 -1
  146. package/utils/focus/is-native-focused-in.d.ts +1 -1
  147. package/utils/focus/is-native-focused.d.ts +1 -1
  148. package/utils/focus/is-native-keyboard-focusable.d.ts +1 -1
  149. package/utils/focus/is-native-mouse-focusable.d.ts +1 -1
  150. package/utils/miscellaneous/index.d.ts +0 -1
  151. package/utils/miscellaneous/provide-options.d.ts +2 -2
  152. package/classes/portals.d.ts +0 -33
  153. package/schematics/ng-update/v4/steps/replace-functions.js.map +0 -1
  154. package/utils/miscellaneous/directive-listener.d.ts +0 -9
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taiga-ui/cdk",
3
- "version": "4.52.0-canary.698642f",
3
+ "version": "4.52.0-canary.6be767f",
4
4
  "description": "Base library for creating Angular components and applications using Taiga UI principles regarding of actual visual appearance",
5
5
  "keywords": [
6
6
  "angular",
@@ -47,6 +47,10 @@
47
47
  "types": "./pipes/index.d.ts",
48
48
  "default": "./fesm2022/taiga-ui-cdk-pipes.mjs"
49
49
  },
50
+ "./portals": {
51
+ "types": "./portals/index.d.ts",
52
+ "default": "./fesm2022/taiga-ui-cdk-portals.mjs"
53
+ },
50
54
  "./services": {
51
55
  "types": "./services/index.d.ts",
52
56
  "default": "./fesm2022/taiga-ui-cdk-services.mjs"
@@ -171,6 +175,10 @@
171
175
  "types": "./directives/visual-viewport/index.d.ts",
172
176
  "default": "./fesm2022/taiga-ui-cdk-directives-visual-viewport.mjs"
173
177
  },
178
+ "./directives/with-styles": {
179
+ "types": "./directives/with-styles/index.d.ts",
180
+ "default": "./fesm2022/taiga-ui-cdk-directives-with-styles.mjs"
181
+ },
174
182
  "./directives/zoom": {
175
183
  "types": "./directives/zoom/index.d.ts",
176
184
  "default": "./fesm2022/taiga-ui-cdk-directives-zoom.mjs"
@@ -191,21 +199,21 @@
191
199
  "types": "./pipes/keys/index.d.ts",
192
200
  "default": "./fesm2022/taiga-ui-cdk-pipes-keys.mjs"
193
201
  },
194
- "./pipes/mapper": {
195
- "types": "./pipes/mapper/index.d.ts",
196
- "default": "./fesm2022/taiga-ui-cdk-pipes-mapper.mjs"
197
- },
198
202
  "./pipes/obfuscate": {
199
203
  "types": "./pipes/obfuscate/index.d.ts",
200
204
  "default": "./fesm2022/taiga-ui-cdk-pipes-obfuscate.mjs"
201
205
  },
206
+ "./pipes/replace": {
207
+ "types": "./pipes/replace/index.d.ts",
208
+ "default": "./fesm2022/taiga-ui-cdk-pipes-replace.mjs"
209
+ },
202
210
  "./pipes/repeat-times": {
203
211
  "types": "./pipes/repeat-times/index.d.ts",
204
212
  "default": "./fesm2022/taiga-ui-cdk-pipes-repeat-times.mjs"
205
213
  },
206
- "./pipes/replace": {
207
- "types": "./pipes/replace/index.d.ts",
208
- "default": "./fesm2022/taiga-ui-cdk-pipes-replace.mjs"
214
+ "./pipes/mapper": {
215
+ "types": "./pipes/mapper/index.d.ts",
216
+ "default": "./fesm2022/taiga-ui-cdk-pipes-mapper.mjs"
209
217
  },
210
218
  "./pipes/to-array": {
211
219
  "types": "./pipes/to-array/index.d.ts",
@@ -249,11 +257,11 @@
249
257
  "@angular/common": ">=19.0.0",
250
258
  "@angular/core": ">=19.0.0",
251
259
  "@angular/forms": ">=19.0.0",
252
- "@ng-web-apis/common": "^4.12.0",
253
- "@ng-web-apis/mutation-observer": "^4.12.0",
254
- "@ng-web-apis/platform": "^4.12.0",
255
- "@ng-web-apis/resize-observer": "^4.12.0",
256
- "@ng-web-apis/screen-orientation": "^4.12.0",
260
+ "@ng-web-apis/common": "^4.12.2",
261
+ "@ng-web-apis/mutation-observer": "^4.12.2",
262
+ "@ng-web-apis/platform": "^4.12.1",
263
+ "@ng-web-apis/resize-observer": "^4.12.2",
264
+ "@ng-web-apis/screen-orientation": "^4.12.1",
257
265
  "@taiga-ui/event-plugins": "^4.7.0",
258
266
  "@taiga-ui/polymorpheus": "^4.9.0",
259
267
  "rxjs": ">=7.0.0"
@@ -16,4 +16,4 @@ export declare const TUI_OBFUSCATE_DEFAULT_OPTIONS: TuiObfuscateOptions;
16
16
  /**
17
17
  * Injection token for obfuscation options.
18
18
  */
19
- export declare const TUI_OBFUSCATE_OPTIONS: import("@angular/core").InjectionToken<TuiObfuscateOptions>, tuiObfuscateOptionsProvider: (item: Partial<TuiObfuscateOptions> | import("@angular/core").ProviderToken<Partial<TuiObfuscateOptions>> | (() => Partial<TuiObfuscateOptions>)) => import("@angular/core").FactoryProvider;
19
+ export declare const TUI_OBFUSCATE_OPTIONS: import("@angular/core").InjectionToken<TuiObfuscateOptions>, tuiObfuscateOptionsProvider: (item: Partial<TuiObfuscateOptions> | (() => Partial<TuiObfuscateOptions>)) => import("@angular/core").FactoryProvider;
@@ -0,0 +1,3 @@
1
+ export * from './portal';
2
+ export * from './portals';
3
+ export * from './service';
@@ -0,0 +1,24 @@
1
+ import { type Type } from '@angular/core';
2
+ import { type TuiContext } from '@taiga-ui/cdk/types';
3
+ import { PolymorpheusComponent, type PolymorpheusContent } from '@taiga-ui/polymorpheus';
4
+ import { Observable, type Observer } from 'rxjs';
5
+ import { type TuiPortalService } from './service';
6
+ import * as i0 from "@angular/core";
7
+ export type TuiPortalContext<T extends object, O> = T & TuiContext<Observer<O>> & {
8
+ readonly content: PolymorpheusContent<TuiPortalContext<T, O>>;
9
+ readonly createdAt: number;
10
+ readonly id: string;
11
+ readonly completeWith: (value: O) => void;
12
+ };
13
+ export declare abstract class TuiPortal<T extends object, K = void> {
14
+ private readonly popups;
15
+ protected abstract readonly component: Type<any>;
16
+ protected abstract readonly options: T;
17
+ private readonly injector;
18
+ private readonly id;
19
+ constructor(popups: TuiPortalService);
20
+ open<G = void>(content: PolymorpheusContent<TuiPortalContext<T, K extends void ? G : K>>, options?: Partial<T>): Observable<K extends void ? G : K>;
21
+ protected add(component: PolymorpheusComponent<unknown>): () => void;
22
+ static ɵfac: i0.ɵɵFactoryDeclaration<TuiPortal<any, any>, never>;
23
+ static ɵprov: i0.ɵɵInjectableDeclaration<TuiPortal<any, any>>;
24
+ }
@@ -0,0 +1,15 @@
1
+ import { type ComponentRef, type EmbeddedViewRef, type TemplateRef } from '@angular/core';
2
+ import { type PolymorpheusComponent } from '@taiga-ui/polymorpheus';
3
+ import * as i0 from "@angular/core";
4
+ /**
5
+ * Abstract class for host element for dynamically created portals.
6
+ */
7
+ export declare abstract class TuiPortals {
8
+ private readonly vcr;
9
+ private readonly injector;
10
+ constructor();
11
+ addComponent<C>(component: PolymorpheusComponent<C>): ComponentRef<C>;
12
+ addTemplate<C>(templateRef: TemplateRef<C>, context?: C): EmbeddedViewRef<C>;
13
+ static ɵfac: i0.ɵɵFactoryDeclaration<TuiPortals, never>;
14
+ static ɵdir: i0.ɵɵDirectiveDeclaration<TuiPortals, never, never, {}, {}, never, never, true, never>;
15
+ }
@@ -0,0 +1,19 @@
1
+ import { type ComponentRef, type EmbeddedViewRef, type Provider, type TemplateRef } from '@angular/core';
2
+ import { PolymorpheusComponent } from '@taiga-ui/polymorpheus';
3
+ import { type TuiPortals } from './portals';
4
+ import * as i0 from "@angular/core";
5
+ /**
6
+ * Abstract service for displaying portals
7
+ */
8
+ export declare abstract class TuiPortalService {
9
+ protected host?: TuiPortals;
10
+ attach(host: TuiPortals): void;
11
+ add<C>(content: PolymorpheusComponent<C>): ComponentRef<C>;
12
+ add<C>(content: TemplateRef<C>, context?: C): EmbeddedViewRef<C>;
13
+ static ɵfac: i0.ɵɵFactoryDeclaration<TuiPortalService, never>;
14
+ static ɵprov: i0.ɵɵInjectableDeclaration<TuiPortalService>;
15
+ }
16
+ export declare function tuiAsPortal(portal: typeof TuiPortalService): Provider;
17
+ export declare class TuiNoHostException extends Error {
18
+ constructor();
19
+ }
@@ -1 +1 @@
1
- export declare const TAIGA_VERSION = "^4.52.0-canary.698642f";
1
+ export declare const TAIGA_VERSION = "^4.52.0-canary.6be767f";
@@ -1,2 +1,2 @@
1
- import { type ReplacementType } from '../../interfaces/replacement-type';
1
+ import { type ReplacementType } from '../interfaces/replacement-type';
2
2
  export declare function replaceFunctions(functions: readonly ReplacementType[]): void;
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.replaceFunctions = replaceFunctions;
4
4
  const ng_morph_1 = require("ng-morph");
5
- const get_named_import_references_1 = require("../../../utils/get-named-import-references");
5
+ const get_named_import_references_1 = require("../../utils/get-named-import-references");
6
6
  function replaceFunctions(functions) {
7
7
  functions.forEach(({ from, to, moduleSpecifier }) => {
8
8
  (0, get_named_import_references_1.getNamedImportReferences)(from, moduleSpecifier).forEach((ref) => {
@@ -0,0 +1 @@
1
+ {"version":3,"file":"replace-functions.js","sourceRoot":"","sources":["../../../../../projects/cdk/schematics/ng-update/utils/replace-functions.ts"],"names":[],"mappings":";;AAKA,4CAmBC;AAxBD,uCAA8B;AAE9B,yFAAiF;AAGjF,SAAgB,gBAAgB,CAAC,SAAqC;IAClE,SAAS,CAAC,OAAO,CAAC,CAAC,EAAC,IAAI,EAAE,EAAE,EAAE,eAAe,EAAC,EAAE,EAAE;QAC9C,IAAA,sDAAwB,EAAC,IAAI,EAAE,eAAe,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;YAC5D,IAAI,GAAG,CAAC,YAAY,EAAE,EAAE,CAAC;gBACrB,OAAO;YACX,CAAC;YAED,MAAM,MAAM,GAAG,GAAG,CAAC,SAAS,EAAE,CAAC;YAE/B,IAAI,eAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC,IAAI,eAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,EAAE,CAAC;gBAClE,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,eAAe,CACnB,MAAM,aAAN,MAAM,uBAAN,MAAM,CACA,OAAO,CAAC,EAAC,oBAAoB,EAAE,KAAK,EAAC,EACtC,IAAI,GACJ,OAAO,CAAC,IAAI,EAAE,EAAE,aAAF,EAAE,cAAF,EAAE,GAAI,IAAI,CAAC,CACjC,CAAC;YACN,CAAC;QACL,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -10,6 +10,7 @@ const get_execution_time_1 = require("../../utils/get-execution-time");
10
10
  const steps_1 = require("../steps");
11
11
  const replace_services_1 = require("../steps/replace-services");
12
12
  const get_file_system_1 = require("../utils/get-file-system");
13
+ const replace_functions_1 = require("../utils/replace-functions");
13
14
  const steps_2 = require("./steps");
14
15
  const constants_1 = require("./steps/constants");
15
16
  const enums_1 = require("./steps/constants/enums");
@@ -20,7 +21,6 @@ const drop_universal_mock_1 = require("./steps/drop-universal-mock");
20
21
  const migrate_editor_1 = require("./steps/migrate-editor");
21
22
  const migrate_providers_from_1 = require("./steps/migrate-providers-from");
22
23
  const migrate_root_1 = require("./steps/migrate-root");
23
- const replace_functions_1 = require("./steps/replace-functions");
24
24
  const replace_modules_with_providers_1 = require("./steps/utils/replace-modules-with-providers");
25
25
  function main(options) {
26
26
  return (tree, context) => {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../projects/cdk/schematics/ng-update/v4/index.ts"],"names":[],"mappings":";;AAoGA,gCAmBC;AAvHD,qDAA4C;AAE5C,2DAKoC;AACpC,4DAAwE;AACxE,uCAAkF;AAElF,8DAA8D;AAE9D,uEAAgE;AAChE,oCAMkB;AAClB,gEAA0D;AAC1D,8DAAuD;AACvD,mCAeiB;AACjB,iDAK2B;AAC3B,mDAAyD;AACzD,2DAA8D;AAC9D,6EAAuF;AACvF,mDAAwD;AACxD,qEAA8D;AAC9D,2DAAqD;AACrD,2EAA0E;AAC1E,uDAAiD;AACjD,iEAA2D;AAC3D,iGAAyF;AAEzF,SAAS,IAAI,CAAC,OAAkB;IAC5B,OAAO,CAAC,IAAU,EAAE,OAAyB,EAAE,EAAE;QAC7C,MA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AAC,OAAO,CAAC,CAAC;QAE3B,IAAA,4BAAiB,GAAE,CAAC;QACpB,IAAA,wBAAgB,EAAC,UAAU,EAAE,OAAO,CAAC,CAAC;QACtC,IAAA,oBAAY,EAAC,OAAO,EAAE,8BAAkB,CAAC,CAAC;QAE1C,UAAU,CAAC,WAAW,EAAE,CAAC;QACzB,IAAA,4BAAiB,GAAE,CAAC;QAEpB,IAAA,wBAAgB,EAAC,OAAO,CAAC,CAAC;QAC1B,IAAA,qBAAa,GAAE,CAAC;QAChB,IAAA,0BAAkB,EAAC,UAAU,EAAE,OAAO,CAAC,CAAC;QACxC,IAAA,sBAAc,EAAC,UAAU,CAAC,CAAC;QAE3B,UAAU,CAAC,WAAW,EAAE,CAAC;QACzB,IAAA,4BAAiB,GAAE,CAAC;QAEpB,OAAO,CAAC,OAAO,CAAC,IAAI,8BAAsB,EAAE,CAAC,CAAC;IAClD,CAAC,CAAC;AACN,CAAC;AAED,SAAgB,UAAU,CAAC,OAAkB;IACzC,MAAM,EAAE,GAAG,6BAAW,CAAC,GAAG,EAAE,CAAC;IAE7B,CAAC,OAAO,CAAC,WAAW,CAAC;QACjB,IAAA,mBAAQ,EACJ,OAAO,uBAAY,iDAAiD,wBAAa,IAAI,CACxF,CAAC;IAEN,OAAO,IAAA,kBAAK,EAAC;QACT,IAAI,CAAC,OAAO,CAAC;QACb,GAAG,EAAE;YACD,MAAM,aAAa,GAAG,IAAA,qCAAgB,EAAC,EAAE,EAAE,6BAAW,CAAC,GAAG,EAAE,CAAC,CAAC;YAE9D,CAAC,OAAO,CAAC,WAAW,CAAC;gBACjB,IAAA,mBAAQ,EACJ,GAAG,wBAAa,wCAAwC,wBAAa,OAAO,aAAa,MAAM,CAClG,CAAC;QACV,CAAC;KACJ,CAAC,CAAC;AACP,CAAC"}
@@ -7,12 +7,21 @@ const tasks_1 = require("@angular-devkit/schematics/tasks");
7
7
  const ng_morph_1 = require("ng-morph");
8
8
  const versions_1 = require("../../ng-add/constants/versions");
9
9
  const get_execution_time_1 = require("../../utils/get-execution-time");
10
+ const get_file_system_1 = require("../utils/get-file-system");
11
+ const replace_functions_1 = require("../utils/replace-functions");
12
+ const functions_1 = require("./steps/constants/functions");
13
+ const migrate_templates_1 = require("./steps/migrate-templates");
10
14
  const migrate_tokens_1 = require("./steps/migrate-tokens/migrate-tokens");
11
15
  const update_tsconfig_1 = require("./steps/migrate-tokens/update-tsconfig");
12
16
  function main(options) {
13
17
  return (tree, context) => {
18
+ const fileSystem = (0, get_file_system_1.getFileSystem)(tree);
14
19
  (0, migrate_tokens_1.migrateTokens)(tree, options);
15
20
  (0, update_tsconfig_1.updateTsConfig)(tree, options);
21
+ (0, replace_functions_1.replaceFunctions)(functions_1.REPLACE_FUNCTIONS);
22
+ (0, migrate_templates_1.migrateTemplates)(fileSystem, options);
23
+ fileSystem.commitEdits();
24
+ (0, ng_morph_1.saveActiveProject)();
16
25
  context.addTask(new tasks_1.NodePackageInstallTask());
17
26
  };
18
27
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../projects/cdk/schematics/ng-update/v5/index.ts"],"names":[],"mappings":";;AA0BA,gCAmBC;AA7CD,qDAA4C;AAE5C,2DAKoC;AACpC,4DAAwE;AACxE,uCAA+D;AAE/D,8DAA8D;AAE9D,uEAAgE;AAChE,0EAAoE;AACpE,4EAAsE;AAEtE,SAAS,IAAI,CAAC,OAAkB;IAC5B,OAAO,CAAC,IAAU,EAAE,OAAyB,EAAE,EAAE;QAC7C,IAAA,8BAAa,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAC7B,IAAA,gCAAc,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAE9B,OAAO,CAAC,OAAO,CAAC,IAAI,8BAAsB,EAAE,CAAC,CAAC;IAClD,CAAC,CAAC;AACN,CAAC;AAED,SAAgB,UAAU,CAAC,OAAkB;IACzC,MAAM,EAAE,GAAG,6BAAW,CAAC,GAAG,EAAE,CAAC;IAE7B,CAA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C;AACN,CAAC;AAED,SAAgB,UAAU,CAAC,OAAkB;IACzC,MAAM,EAAE,GAAG,6BAAW,CAAC,GAAG,EAAE,CAAC;IAE7B,CAAC,OAAO,CAAC,WAAW,CAAC;QACjB,IAAA,mBAAQ,EACJ,OAAO,uBAAY,iDAAiD,wBAAa,IAAI,CACxF,CAAC;IAEN,OAAO,IAAA,kBAAK,EAAC;QACT,IAAI,CAAC,OAAO,CAAC;QACb,GAAG,EAAE;YACD,MAAM,aAAa,GAAG,IAAA,qCAAgB,EAAC,EAAE,EAAE,6BAAW,CAAC,GAAG,EAAE,CAAC,CAAC;YAE9D,CAAC,OAAO,CAAC,WAAW,CAAC;gBACjB,IAAA,mBAAQ,EACJ,GAAG,wBAAa,wCAAwC,wBAAa,OAAO,aAAa,MAAM,CAClG,CAAC;QACV,CAAC;KACJ,CAAC,CAAC;AACP,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { type ReplacementType } from '../../../interfaces/replacement-type';
2
+ export declare const REPLACE_FUNCTIONS: readonly ReplacementType[];
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.REPLACE_FUNCTIONS = void 0;
4
+ exports.REPLACE_FUNCTIONS = [
5
+ {
6
+ from: 'tuiIsNativeFocused',
7
+ to: 'tuiIsFocused',
8
+ moduleSpecifier: ['@taiga-ui/cdk'],
9
+ },
10
+ {
11
+ from: 'tuiIsNativeFocusedIn',
12
+ to: 'tuiIsFocusedIn',
13
+ moduleSpecifier: ['@taiga-ui/cdk'],
14
+ },
15
+ {
16
+ from: 'tuiGetNativeFocused',
17
+ to: 'tuiGetFocused',
18
+ moduleSpecifier: ['@taiga-ui/cdk'],
19
+ },
20
+ {
21
+ from: 'tuiIsNativeMouseFocusable',
22
+ to: 'tuiIsMouseFocusable',
23
+ moduleSpecifier: ['@taiga-ui/cdk'],
24
+ },
25
+ {
26
+ from: 'tuiIsNativeKeyboardFocusable',
27
+ to: 'tuiIsKeyboardFocusable',
28
+ moduleSpecifier: ['@taiga-ui/cdk'],
29
+ },
30
+ {
31
+ from: 'tuiBlurNativeFocused',
32
+ to: 'tuiBlurFocused',
33
+ moduleSpecifier: ['@taiga-ui/cdk'],
34
+ },
35
+ ];
36
+ //# sourceMappingURL=functions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"functions.js","sourceRoot":"","sources":["../../../../../../../projects/cdk/schematics/ng-update/v5/steps/constants/functions.ts"],"names":[],"mappings":";;;AAEa,QAAA,iBAAiB,GAA+B;IACzD;QACI,IAAI,EAAE,oBAAoB;QAC1B,EAAE,EAAE,cAAc;QAClB,eAAe,EAAE,CAAC,eAAe,CAAC;KACrC;IACD;QACI,IAAI,EAAE,sBAAsB;QAC5B,EAAE,EAAE,gBAAgB;QACpB,eAAe,EAAE,CAAC,eAAe,CAAC;KACrC;IACD;QACI,IAAI,EAAE,qBAAqB;QAC3B,EAAE,EAAE,eAAe;QACnB,eAAe,EAAE,CAAC,eAAe,CAAC;KACrC;IACD;QACI,IAAI,EAAE,2BAA2B;QACjC,EAAE,EAAE,qBAAqB;QACzB,eAAe,EAAE,CAAC,eAAe,CAAC;KACrC;IACD;QACI,IAAI,EAAE,8BAA8B;QACpC,EAAE,EAAE,wBAAwB;QAC5B,eAAe,EAAE,CAAC,eAAe,CAAC;KACrC;IACD;QACI,IAAI,EAAE,sBAAsB;QAC5B,EAAE,EAAE,gBAAgB;QACpB,eAAe,EAAE,CAAC,eAAe,CAAC;KACrC;CACJ,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { type HtmlComment } from '../../../interfaces';
2
+ export declare const HTML_COMMENTS: HtmlComment[];
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.HTML_COMMENTS = void 0;
4
+ exports.HTML_COMMENTS = [
5
+ {
6
+ tag: 'tui-range',
7
+ withAttrs: ['(activeThumbChange)'],
8
+ comment: '(activeThumbChange) emits "start"/"end" instead of "left"/"right". Adjust your code accordingly',
9
+ },
10
+ ];
11
+ //# sourceMappingURL=html-comments.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"html-comments.js","sourceRoot":"","sources":["../../../../../../../projects/cdk/schematics/ng-update/v5/steps/constants/html-comments.ts"],"names":[],"mappings":";;;AAEa,QAAA,aAAa,GAAkB;IACxC;QACI,GAAG,EAAE,WAAW;QAChB,SAAS,EAAE,CAAC,qBAAqB,CAAC;QAClC,OAAO,EACH,iGAAiG;KACxG;CACJ,CAAC"}
@@ -0,0 +1,17 @@
1
+ import { type DevkitFileSystem, type UpdateRecorder } from 'ng-morph';
2
+ import { type TuiSchema } from '../../../ng-add/schema';
3
+ import { type TemplateResource } from '../../interfaces/template-resource';
4
+ export declare function getAction<T>({ action, requiredData, }: {
5
+ action: ({ resource, fileSystem, recorder, data, }: {
6
+ fileSystem: DevkitFileSystem;
7
+ recorder: UpdateRecorder;
8
+ data: T;
9
+ resource: TemplateResource;
10
+ }) => void;
11
+ requiredData: T;
12
+ }): ({ resource, fileSystem, recorder, }: {
13
+ fileSystem: DevkitFileSystem;
14
+ recorder: UpdateRecorder;
15
+ resource: TemplateResource;
16
+ }) => void;
17
+ export declare function migrateTemplates(fileSystem: DevkitFileSystem, options: TuiSchema): void;
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getAction = getAction;
4
+ exports.migrateTemplates = migrateTemplates;
5
+ const ng_morph_1 = require("ng-morph");
6
+ const constants_1 = require("../../../constants");
7
+ const add_import_to_closest_module_1 = require("../../../utils/add-import-to-closest-module");
8
+ const progress_1 = require("../../../utils/progress");
9
+ const get_component_templates_1 = require("../../../utils/templates/get-component-templates");
10
+ const template_resource_1 = require("../../../utils/templates/template-resource");
11
+ const templates_1 = require("../../utils/templates");
12
+ const html_comments_1 = require("./constants/html-comments");
13
+ function getAction({ action, requiredData, }) {
14
+ return ({ resource, fileSystem, recorder, }) => action({ resource, fileSystem, recorder, data: requiredData });
15
+ }
16
+ function migrateTemplates(fileSystem, options) {
17
+ !options['skip-logs'] &&
18
+ (0, ng_morph_1.infoLog)(`${ng_morph_1.SMALL_TAB_SYMBOL}${ng_morph_1.REPLACE_SYMBOL} migrating templates...`);
19
+ const componentWithTemplatesPaths = (0, get_component_templates_1.getComponentTemplates)(constants_1.ALL_TS_FILES);
20
+ const actions = [
21
+ getAction({ action: templates_1.addHTMLCommentTags, requiredData: html_comments_1.HTML_COMMENTS }),
22
+ ];
23
+ const progressLog = (0, progress_1.setupProgressLogger)({
24
+ total: componentWithTemplatesPaths.length,
25
+ });
26
+ componentWithTemplatesPaths.forEach((resource) => {
27
+ const path = fileSystem.resolve((0, template_resource_1.getPathFromTemplateResource)(resource));
28
+ const recorder = fileSystem.edit(path);
29
+ actions.forEach((action, actionIndex) => {
30
+ const isLastAction = actionIndex === actions.length - 1;
31
+ !options['skip-logs'] && progressLog(action.name, isLastAction);
32
+ action({ resource, fileSystem, recorder });
33
+ });
34
+ });
35
+ fileSystem.commitEdits();
36
+ (0, add_import_to_closest_module_1.saveAddedImports)(options);
37
+ !options['skip-logs'] &&
38
+ (0, ng_morph_1.successLog)(`${ng_morph_1.SMALL_TAB_SYMBOL}${ng_morph_1.SUCCESS_SYMBOL} templates migrated \n`);
39
+ }
40
+ //# sourceMappingURL=migrate-templates.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"migrate-templates.js","sourceRoot":"","sources":["../../../../../../projects/cdk/schematics/ng-update/v5/steps/migrate-templates.ts"],"names":[],"mappings":";;AAoBA,8BA0BC;AAED,4CAgCC;AAhFD,uCAQkB;AAElB,kDAAgD;AAEhD,8FAA6E;AAC7E,sDAA4D;AAC5D,8FAAuF;AACvF,kFAAuF;AAEvF,qDAAyD;AACzD,6DAAwD;AAExD,SAAgB,SAAS,CAAI,EACzB,MAAM,EACN,YAAY,GAcf;IACG,OAAO,CAAC,EACJ,QAAQ,EACR,UAAU,EACV,QAAQ,GAKX,EAAE,EAA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,OAAO,CAAC,WAAW,CAAC;QACjB,IAAA,qBAAU,EAAC,GAAG,2BAAgB,GAAG,yBAAc,wBAAwB,CAAC,CAAC;AACjF,CAAC"}
@@ -1,4 +1,9 @@
1
1
  import { InjectionToken } from '@angular/core';
2
+ /**
3
+ * Unified mobile detection regex.
4
+ * https://stackoverflow.com/a/11381730/2706426 http://detectmobilebrowsers.com/
5
+ */
6
+ export declare const TUI_MOBILE_REGEXP: RegExp;
2
7
  export declare const TUI_IS_MOBILE: InjectionToken<boolean>;
3
8
  export declare const TUI_IS_IOS: InjectionToken<boolean>;
4
9
  export declare const TUI_IS_ANDROID: InjectionToken<boolean>;
@@ -1,5 +1,5 @@
1
- import { type FactoryProvider, InjectionToken, type ProviderToken } from '@angular/core';
1
+ import { type FactoryProvider, InjectionToken } from '@angular/core';
2
2
  export declare function tuiCreateOptions<T>(defaults: T): [
3
3
  token: InjectionToken<T>,
4
- provider: (item: Partial<T> | ProviderToken<Partial<T>> | (() => Partial<T>)) => FactoryProvider
4
+ provider: (item: Partial<T> | (() => Partial<T>)) => FactoryProvider
5
5
  ];
@@ -6,4 +6,4 @@
6
6
  * function tuiGetElementObscures(element: Element): readonly [Element, Element, Element, Element] | [] | null
7
7
  * ```
8
8
  */
9
- export declare function tuiGetElementObscures(element: Element): readonly [Element, Element, Element, Element] | [] | null;
9
+ export declare function tuiGetElementObscures(element: Element): readonly Element[] | null;
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * Finds and blurs current active element, including shadow DOM
3
3
  */
4
- export declare function tuiBlurNativeFocused(doc: Document): void;
4
+ export declare function tuiBlurFocused(doc: Document): void;
@@ -3,4 +3,4 @@
3
3
  *
4
4
  * @return element or null
5
5
  */
6
- export declare function tuiGetNativeFocused({ activeElement }: Document): Element | null;
6
+ export declare function tuiGetFocused({ activeElement }: Document): Element | null;
@@ -4,4 +4,4 @@
4
4
  * @param node
5
5
  * @return true if focused node is contained within element
6
6
  */
7
- export declare function tuiIsNativeFocusedIn(node?: Node | null): boolean;
7
+ export declare function tuiIsFocusedIn(node?: Node | null): boolean;
@@ -6,4 +6,4 @@
6
6
  * @param node or null (as a common return value of DOM nodes walking)
7
7
  * @return true if focused
8
8
  */
9
- export declare function tuiIsNativeFocused(node?: Node | null): boolean;
9
+ export declare function tuiIsFocused(node?: Node | null): boolean;
@@ -4,4 +4,4 @@
4
4
  * be focused, for example element can have display: none applied to it or any other
5
5
  * circumstances could prevent actual focus.
6
6
  */
7
- export declare function tuiIsNativeKeyboardFocusable(element: Element): boolean;
7
+ export declare function tuiIsKeyboardFocusable(element: Element): boolean;
@@ -1 +1 @@
1
- export declare function tuiIsNativeMouseFocusable(element: Element): boolean;
1
+ export declare function tuiIsMouseFocusable(element: Element): boolean;
@@ -6,7 +6,6 @@ export * from './count-filled-controls';
6
6
  export * from './create-token';
7
7
  export * from './default-sort';
8
8
  export * from './directive-binding';
9
- export * from './directive-listener';
10
9
  export * from './distance-between-touches';
11
10
  export * from './ease-in-out-quad';
12
11
  export * from './flat-length';
@@ -1,2 +1,2 @@
1
- import { type FactoryProvider, type InjectionToken, type ProviderToken } from '@angular/core';
2
- export declare function tuiProvideOptions<T>(provide: InjectionToken<T>, options: Partial<T> | ProviderToken<Partial<T>> | (() => Partial<T>), fallback: T): FactoryProvider;
1
+ import { type FactoryProvider, type InjectionToken } from '@angular/core';
2
+ export declare function tuiProvideOptions<T>(provide: InjectionToken<T>, options: Partial<T> | (() => Partial<T>), fallback: T): FactoryProvider;
@@ -1,33 +0,0 @@
1
- import { type ComponentRef, type EmbeddedViewRef, type Provider, type TemplateRef, type ViewRef } from '@angular/core';
2
- import { type PolymorpheusComponent } from '@taiga-ui/polymorpheus';
3
- import * as i0 from "@angular/core";
4
- /**
5
- * Abstract class for host element for dynamically created portals.
6
- */
7
- export declare abstract class TuiPortals {
8
- private readonly vcr;
9
- private readonly injector;
10
- protected readonly nothing: void;
11
- addComponentChild<C>(component: PolymorpheusComponent<C>): ComponentRef<C>;
12
- addTemplateChild<C>(templateRef: TemplateRef<C>, context?: C): EmbeddedViewRef<C>;
13
- static ɵfac: i0.ɵɵFactoryDeclaration<TuiPortals, never>;
14
- static ɵdir: i0.ɵɵDirectiveDeclaration<TuiPortals, never, never, {}, {}, never, never, true, never>;
15
- }
16
- /**
17
- * Abstract service for displaying portals
18
- */
19
- export declare abstract class TuiPortalService {
20
- protected host?: TuiPortals;
21
- attach(host: TuiPortals): void;
22
- add<C>(component: PolymorpheusComponent<C>): ComponentRef<C>;
23
- remove<C>({ hostView }: ComponentRef<C>): void;
24
- addTemplate<C>(templateRef: TemplateRef<C>, context?: C): EmbeddedViewRef<C>;
25
- removeTemplate<C>(viewRef: EmbeddedViewRef<C> | ViewRef): void;
26
- protected get safeHost(): TuiPortals;
27
- static ɵfac: i0.ɵɵFactoryDeclaration<TuiPortalService, never>;
28
- static ɵprov: i0.ɵɵInjectableDeclaration<TuiPortalService>;
29
- }
30
- export declare function tuiAsPortal(portal: typeof TuiPortalService): Provider;
31
- export declare class TuiNoHostException extends Error {
32
- constructor();
33
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"replace-functions.js","sourceRoot":"","sources":["../../../../../../projects/cdk/schematics/ng-update/v4/steps/replace-functions.ts"],"names":[],"mappings":";;AAKA,4CAmBC;AAxBD,uCAA8B;AAE9B,4FAAoF;AAGpF,SAAgB,gBAAgB,CAAC,SAAqC;IAClE,SAAS,CAAC,OAAO,CAAC,CAAC,EAAC,IAAI,EAAE,EAAE,EAAE,eAAe,EAAC,EAAE,EAAE;QAC9C,IAAA,sDAAwB,EAAC,IAAI,EAAE,eAAe,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;YAC5D,IAAI,GAAG,CAAC,YAAY,EAAE,EAAE,CAAC;gBACrB,OAAO;YACX,CAAC;YAED,MAAM,MAAM,GAAG,GAAG,CAAC,SAAS,EAAE,CAAC;YAE/B,IAAI,eAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC,IAAI,eAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,EAAE,CAAC;gBAClE,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,eAAe,CACnB,MAAM,aAAN,MAAM,uBAAN,MAAM,CACA,OAAO,CAAC,EAAC,oBAAoB,EAAE,KAAK,EAAC,EACtC,IAAI,GACJ,OAAO,CAAC,IAAI,EAAE,EAAE,aAAF,EAAE,cAAF,EAAE,GAAI,IAAI,CAAC,CACjC,CAAC;YACN,CAAC;QACL,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -1,9 +0,0 @@
1
- import { type InjectOptions, type ProviderToken, type Signal } from '@angular/core';
2
- import { type Observable } from 'rxjs';
3
- type OutputKeysOf<T> = {
4
- [K in keyof T]: T[K] extends Observable<any> | Signal<any> ? K : never;
5
- }[keyof T];
6
- type OutputTypeOf<T> = T extends Signal<infer R> ? R : T extends Observable<infer O> ? O : never;
7
- /** @deprecated remove in v5 */
8
- export declare function tuiDirectiveListener<T, K extends OutputKeysOf<T>>(token: ProviderToken<T>, key: K, options?: InjectOptions): Signal<OutputTypeOf<T[K]>>;
9
- export {};