@taiga-ui/cdk 4.52.0-canary.4d93c87 → 4.52.0-canary.55ce829

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 (70) hide show
  1. package/classes/index.d.ts +0 -1
  2. package/constants/index.d.ts +0 -1
  3. package/constants/used-icons.d.ts +1 -1
  4. package/constants/version.d.ts +1 -1
  5. package/constants/version.js +1 -1
  6. package/date-time/time.d.ts +2 -2
  7. package/date-time/types.d.ts +0 -5
  8. package/directives/active-zone/active-zone.directive.d.ts +3 -2
  9. package/directives/auto-focus/autofocus.options.d.ts +1 -1
  10. package/directives/repeat-times/repeat-times.directive.d.ts +2 -2
  11. package/fesm2022/taiga-ui-cdk-classes.mjs +2 -73
  12. package/fesm2022/taiga-ui-cdk-classes.mjs.map +1 -1
  13. package/fesm2022/taiga-ui-cdk-constants.mjs +3 -14
  14. package/fesm2022/taiga-ui-cdk-constants.mjs.map +1 -1
  15. package/fesm2022/taiga-ui-cdk-date-time.mjs +13 -1
  16. package/fesm2022/taiga-ui-cdk-date-time.mjs.map +1 -1
  17. package/fesm2022/taiga-ui-cdk-directives-active-zone.mjs +16 -19
  18. package/fesm2022/taiga-ui-cdk-directives-active-zone.mjs.map +1 -1
  19. package/fesm2022/taiga-ui-cdk-directives-obscured.mjs +7 -3
  20. package/fesm2022/taiga-ui-cdk-directives-obscured.mjs.map +1 -1
  21. package/fesm2022/taiga-ui-cdk-directives-repeat-times.mjs +6 -6
  22. package/fesm2022/taiga-ui-cdk-directives-repeat-times.mjs.map +1 -1
  23. package/fesm2022/taiga-ui-cdk-observables.mjs +8 -4
  24. package/fesm2022/taiga-ui-cdk-observables.mjs.map +1 -1
  25. package/fesm2022/taiga-ui-cdk-portals.mjs +126 -0
  26. package/fesm2022/taiga-ui-cdk-portals.mjs.map +1 -0
  27. package/fesm2022/taiga-ui-cdk-tokens.mjs +2 -2
  28. package/fesm2022/taiga-ui-cdk-tokens.mjs.map +1 -1
  29. package/fesm2022/taiga-ui-cdk-utils-dom.mjs +15 -23
  30. package/fesm2022/taiga-ui-cdk-utils-dom.mjs.map +1 -1
  31. package/fesm2022/taiga-ui-cdk-utils-focus.mjs +6 -7
  32. package/fesm2022/taiga-ui-cdk-utils-focus.mjs.map +1 -1
  33. package/fesm2022/taiga-ui-cdk-utils-miscellaneous.mjs +2 -10
  34. package/fesm2022/taiga-ui-cdk-utils-miscellaneous.mjs.map +1 -1
  35. package/fesm2022/taiga-ui-cdk.mjs +1 -0
  36. package/fesm2022/taiga-ui-cdk.mjs.map +1 -1
  37. package/index.d.ts +1 -0
  38. package/package.json +10 -6
  39. package/portals/directive.d.ts +11 -0
  40. package/portals/index.d.ts +4 -0
  41. package/portals/portal.d.ts +25 -0
  42. package/portals/portals.d.ts +12 -0
  43. package/portals/service.d.ts +15 -0
  44. package/schematics/migrate-tui-let/index.js +2 -2
  45. package/schematics/migrate-tui-let/index.js.map +1 -1
  46. package/schematics/ng-add/constants/versions.d.ts +1 -1
  47. package/schematics/ng-update/v4/steps/constants/migration-warnings.js +1 -1
  48. package/schematics/ng-update/v4/steps/constants/migration-warnings.js.map +1 -1
  49. package/schematics/ng-update/v4/steps/restore-tui-mapper.js +1 -1
  50. package/schematics/ng-update/v4/steps/restore-tui-mapper.js.map +1 -1
  51. package/schematics/ng-update/v4/steps/restore-tui-matcher.js +1 -1
  52. package/schematics/ng-update/v4/steps/restore-tui-matcher.js.map +1 -1
  53. package/schematics/ng-update/v5/index.js +2 -0
  54. package/schematics/ng-update/v5/index.js.map +1 -1
  55. package/schematics/ng-update/v5/steps/constants/functions.js +15 -0
  56. package/schematics/ng-update/v5/steps/constants/functions.js.map +1 -1
  57. package/schematics/ng-update/v5/steps/constants/html-comments.d.ts +2 -0
  58. package/schematics/ng-update/v5/steps/constants/html-comments.js +11 -0
  59. package/schematics/ng-update/v5/steps/constants/html-comments.js.map +1 -0
  60. package/schematics/ng-update/v5/steps/migrate-templates.d.ts +17 -0
  61. package/schematics/ng-update/v5/steps/migrate-templates.js +40 -0
  62. package/schematics/ng-update/v5/steps/migrate-templates.js.map +1 -0
  63. package/utils/dom/get-element-obscurers.d.ts +1 -1
  64. package/utils/focus/blur-native-focused.d.ts +1 -1
  65. package/utils/focus/is-native-keyboard-focusable.d.ts +1 -1
  66. package/utils/focus/is-native-mouse-focusable.d.ts +1 -1
  67. package/utils/miscellaneous/index.d.ts +0 -1
  68. package/classes/portals.d.ts +0 -33
  69. package/constants/allow-signal-writes.d.ts +0 -2
  70. package/utils/miscellaneous/directive-listener.d.ts +0 -9
@@ -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,UAA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OAAO,CAAC,CAAC;IAE1B,CAAC,OAAO,CAAC,WAAW,CAAC;QACjB,IAAA,qBAAU,EAAC,GAAG,2BAAgB,GAAG,yBAAc,wBAAwB,CAAC,CAAC;AACjF,CAAC"}
@@ -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;
@@ -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,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,2 +0,0 @@
1
- import { type CreateEffectOptions } from '@angular/core';
2
- export declare const TUI_ALLOW_SIGNAL_WRITES: CreateEffectOptions;
@@ -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 {};